-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bundle dependencies in module to support Node.js
- Loading branch information
Showing
3 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -17,24 +17,34 @@ ESM and CJS bundles are included, also backwards compatible with [email protected] | |
npm install --save change-case-all | ||
``` | ||
|
||
### Via class | ||
### Browser / ESM | ||
```ts | ||
import { Case } from 'change-case-all'; | ||
|
||
const camel = Case.camel('test string'); // testString | ||
const upper = Case.upper('test string'); // TEST STRING | ||
``` | ||
|
||
### Via functions | ||
```ts | ||
import { camelCase, upperCase, ... } from 'change-case-all'; | ||
|
||
import { camelCase, upperCase, ... } from 'change-case-all'; | ||
const camel = camelCase('test string'); // testString | ||
const upper = upperCase('test string'); // TEST STRING | ||
``` | ||
|
||
### Node.js | ||
```ts | ||
const { Case } = require('change-case-all'); | ||
const camel = Case.camel('foo-bar'); // fooBar | ||
const snake = Case.snake('fooBar'); // foo_bar | ||
|
||
const { camelCase, snakeCase } = require('change-case-all'); | ||
const camel = camelCase('foo-bar'); // fooBar | ||
const snake = snakeCase('fooBar'); // foo_bar | ||
``` | ||
|
||
## Changelog | ||
|
||
### 2.1.0 | ||
- Bundle dependencies in module to support Node.js | ||
|
||
### 2.0.0 | ||
|
||
- Updated dependencies to `[email protected]` | ||
|
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
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