-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dstufft/python-support
- Loading branch information
Showing
36 changed files
with
7,482 additions
and
19,398 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import * as camelcase from 'camelcase' | ||
import * as decamelize from 'decamelize' | ||
import { default as camelcase } from 'camelcase'; | ||
import * as decamelize from 'decamelize'; | ||
|
||
export function toCamelCase(...args: string[]) { | ||
return camelcase(...args); | ||
return camelcase(args); | ||
} | ||
|
||
export function toPascalCase(...args: string[]) { | ||
const v = toCamelCase(...args); | ||
return v.charAt(0).toUpperCase() + v.slice(1); | ||
return camelcase(args, { pascalCase: true }); | ||
} | ||
|
||
export function toSnakeCase(s: string, sep = '_') { | ||
return decamelize(s, sep) | ||
return decamelize(s, sep); | ||
} |
Oops, something went wrong.