Socket
Socket
Sign inDemoInstall

change-case

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

change-case - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

2

package.json
{
"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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc