保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 ab4e8129d5c94ff96e6c85d0d2b66a04a052b4e5
PAMapp/node_modules/css-loader/node_modules/camelcase/readme.md
@@ -1,8 +1,10 @@
# camelcase [![Build Status](https://travis-ci.com/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.com/sindresorhus/camelcase)
# camelcase
> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
Correctly handles Unicode strings.
If you use this on untrusted user input, don't forget to limit the length to something reasonable.
## Install
@@ -10,7 +12,7 @@
$ npm install camelcase
```
*If you need to support Firefox, stay on version 5 as version 6 uses regex features not available in Firefox.*
*If you need to support Firefox < 78, stay on version 5 as version 6 uses regex features not available in Firefox < 78.*
## Usage
@@ -26,8 +28,8 @@
camelCase('Foo-Bar');
//=> 'fooBar'
camelCase('розовый_пушистый_единороги');
//=> 'розовыйПушистыйЕдинороги'
camelCase('розовый_пушистый_единорог');
//=> 'розовыйПушистыйЕдинорог'
camelCase('Foo-Bar', {pascalCase: true});
//=> 'FooBar'
@@ -92,7 +94,7 @@
##### locale
Type: `string | string[]`\
Type: `false | string | string[]`\
Default: The host environment’s current locale.
The locale parameter indicates the locale to be used to convert to upper/lower case according to any locale-specific case mappings. If multiple locales are given in an array, the best available locale is used.
@@ -113,6 +115,20 @@
//=> 'loremİpsum'
```
Setting `locale: false` ignores the platform locale and uses the [Unicode Default Case Conversion](https://unicode-org.github.io/icu/userguide/transforms/casemappings.html#simple-single-character-case-mapping) algorithm:
```js
const camelCase = require('camelcase');
// On a platform with 'tr-TR'
camelCase('lorem-ipsum');
//=> 'loremİpsum'
camelCase('lorem-ipsum', {locale: false});
//=> 'loremIpsum'
```
## camelcase for enterprise
Available as part of the Tidelift Subscription.