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:
724 bytes
|
Line | |
---|
1 | import { __assign } from "tslib";
|
---|
2 | import { noCase } from "no-case";
|
---|
3 | export function pascalCaseTransform(input, index) {
|
---|
4 | var firstChar = input.charAt(0);
|
---|
5 | var lowerChars = input.substr(1).toLowerCase();
|
---|
6 | if (index > 0 && firstChar >= "0" && firstChar <= "9") {
|
---|
7 | return "_" + firstChar + lowerChars;
|
---|
8 | }
|
---|
9 | return "" + firstChar.toUpperCase() + lowerChars;
|
---|
10 | }
|
---|
11 | export function pascalCaseTransformMerge(input) {
|
---|
12 | return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
|
---|
13 | }
|
---|
14 | export function pascalCase(input, options) {
|
---|
15 | if (options === void 0) { options = {}; }
|
---|
16 | return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options));
|
---|
17 | }
|
---|
18 | //# sourceMappingURL=index.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.