web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.3 KiB

  1. # Camel Case
  2. [![NPM version][npm-image]][npm-url]
  3. [![NPM downloads][downloads-image]][downloads-url]
  4. [![Bundle size][bundlephobia-image]][bundlephobia-url]
  5. > Transform into a string with the separator denoted by the next word capitalized.
  6. ## Installation
  7. ```
  8. npm install camel-case --save
  9. ```
  10. ## Usage
  11. ```js
  12. import { camelCase } from "camel-case";
  13. camelCase("string"); //=> "string"
  14. camelCase("dot.case"); //=> "dotCase"
  15. camelCase("PascalCase"); //=> "pascalCase"
  16. camelCase("version 1.2.10"); //=> "version_1_2_10"
  17. ```
  18. The function also accepts [`options`](https://github.com/blakeembrey/change-case#options).
  19. ### Merge Numbers
  20. If you'd like to remove the behavior prefixing `_` before numbers, you can use `camelCaseTransformMerge`:
  21. ```js
  22. import { camelCaseTransformMerge } from "camel-case";
  23. camelCase("version 12", { transform: camelCaseTransformMerge }); //=> "version12"
  24. ```
  25. ## License
  26. MIT
  27. [npm-image]: https://img.shields.io/npm/v/camel-case.svg?style=flat
  28. [npm-url]: https://npmjs.org/package/camel-case
  29. [downloads-image]: https://img.shields.io/npm/dm/camel-case.svg?style=flat
  30. [downloads-url]: https://npmjs.org/package/camel-case
  31. [bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/camel-case.svg
  32. [bundlephobia-url]: https://bundlephobia.com/result?p=camel-case