main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[79a0317] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | exports.pascalCase = exports.pascalCaseTransformMerge = exports.pascalCaseTransform = void 0;
|
---|
| 4 | var tslib_1 = require("tslib");
|
---|
| 5 | var no_case_1 = require("no-case");
|
---|
| 6 | function pascalCaseTransform(input, index) {
|
---|
| 7 | var firstChar = input.charAt(0);
|
---|
| 8 | var lowerChars = input.substr(1).toLowerCase();
|
---|
| 9 | if (index > 0 && firstChar >= "0" && firstChar <= "9") {
|
---|
| 10 | return "_" + firstChar + lowerChars;
|
---|
| 11 | }
|
---|
| 12 | return "" + firstChar.toUpperCase() + lowerChars;
|
---|
| 13 | }
|
---|
| 14 | exports.pascalCaseTransform = pascalCaseTransform;
|
---|
| 15 | function pascalCaseTransformMerge(input) {
|
---|
| 16 | return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
|
---|
| 17 | }
|
---|
| 18 | exports.pascalCaseTransformMerge = pascalCaseTransformMerge;
|
---|
| 19 | function pascalCase(input, options) {
|
---|
| 20 | if (options === void 0) { options = {}; }
|
---|
| 21 | return no_case_1.noCase(input, tslib_1.__assign({ delimiter: "", transform: pascalCaseTransform }, options));
|
---|
| 22 | }
|
---|
| 23 | exports.pascalCase = pascalCase;
|
---|
| 24 | //# sourceMappingURL=index.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.