change-case
Advanced tools
Comparing version 5.1.0 to 5.1.1
{ | ||
"name": "change-case", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "Transform a string between `camelCase`, `PascalCase`, `Capital Case`, `snake_case`, `kebab-case`, `CONSTANT_CASE` and others", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -13,4 +13,10 @@ # Change Case | ||
These case change functions are included: | ||
```js | ||
import * as changeCase from "change-case"; | ||
changeCase.camelCase("TEST_VALUE"); //=> "testValue" | ||
``` | ||
Included case functions: | ||
| Method | Result | | ||
@@ -31,6 +37,4 @@ | ----------------- | ----------- | | ||
All core methods accept [`options`](#options) as the second argument. | ||
All methods accept an `options` object as the second argument: | ||
### Options | ||
- `locale?: string[] | string | false` Lower/upper according to specified locale, defaults to host environment. Set to `false` to disable. | ||
@@ -42,3 +46,3 @@ - `separateNumbers?: boolean` Splits `foo123` into `foo 123` instead of keeping them together. Defaults to `true`. | ||
**Change case** also exports a `split` function which can be used to build your own case formatting methods. It accepts a string and returns each "word" as an array. For example: | ||
**Change case** exports a `split` utility which can be used to build other case functions. It accepts a string and returns each "word" as an array. For example: | ||
@@ -59,7 +63,7 @@ ```js | ||
Keys is a wrapper around all case methods to support transforming objects to any case. | ||
**Change case keys** wraps around the core methods to transform object keys to any case. | ||
### API | ||
- **input: unknown** Any JavaScript value. | ||
- **input: any** Any JavaScript value. | ||
- **depth: number** Specify the depth to transfer for case transformation. Defaults to `1`. | ||
@@ -66,0 +70,0 @@ - **options: object** Same as base case library. |
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
33185
75