@azure-tools/codegen
Advanced tools
Comparing version 2.1.218 to 2.1.219
@@ -43,3 +43,3 @@ import { TextPossibilities } from './file-generator'; | ||
export declare function removeSequentialDuplicates(identifier: Iterable<string>): string[]; | ||
export declare function pascalCase(identifier: string | Array<string>): string; | ||
export declare function pascalCase(identifier: string | Array<string>, removeDuplicates?: boolean): string; | ||
export declare function camelCase(identifier: string | Array<string>): string; | ||
@@ -46,0 +46,0 @@ export declare function getPascalIdentifier(name: string): string; |
@@ -240,6 +240,6 @@ "use strict"; | ||
exports.removeSequentialDuplicates = removeSequentialDuplicates; | ||
function pascalCase(identifier) { | ||
function pascalCase(identifier, removeDuplicates = true) { | ||
return identifier === undefined ? '' : typeof identifier === 'string' ? | ||
pascalCase(fixLeadingNumber(deconstruct(identifier))) : | ||
[...removeSequentialDuplicates(identifier)].map(each => each.capitalize()).join(''); | ||
pascalCase(fixLeadingNumber(deconstruct(identifier)), removeDuplicates) : | ||
(removeDuplicates ? [...removeSequentialDuplicates(identifier)] : identifier).map(each => each.capitalize()).join(''); | ||
} | ||
@@ -246,0 +246,0 @@ exports.pascalCase = pascalCase; |
{ | ||
"name": "@azure-tools/codegen", | ||
"version": "2.1.218", | ||
"version": "2.1.219", | ||
"patchOffset": 100, | ||
@@ -5,0 +5,0 @@ "description": "Autorest Code generator common and base classes", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
190298