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.

README.md 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # pascalcase [![NPM version](https://badge.fury.io/js/pascalcase.svg)](http://badge.fury.io/js/pascalcase)
  2. > Convert a string to pascal-case.
  3. ## Install
  4. Install with [npm](https://www.npmjs.com/)
  5. ```sh
  6. $ npm i pascalcase --save
  7. ```
  8. ## Usage
  9. ```js
  10. var pascalcase = require('pascalcase');
  11. pascalcase('a');
  12. //=> 'A'
  13. pascalcase('foo bar baz');
  14. //=> 'FooBarBaz'
  15. pascalcase('foo_bar-baz');
  16. //=> 'FooBarBaz'
  17. pascalcase('foo.bar.baz');
  18. //=> 'FooBarBaz'
  19. pascalcase('foo/bar/baz');
  20. //=> 'FooBarBaz'
  21. pascalcase('foo[bar)baz');
  22. //=> 'FooBarBaz'
  23. pascalcase('#foo+bar*baz');
  24. //=> 'FooBarBaz'
  25. pascalcase('$foo~bar`baz');
  26. //=> 'FooBarBaz'
  27. pascalcase('_foo_bar-baz-');
  28. //=> 'FooBarBaz'
  29. ```
  30. ## Related projects
  31. * [justified](https://github.com/jonschlinkert/justified): Wrap words to a specified length and justified the text.
  32. * [pad-left](https://github.com/jonschlinkert/pad-left): Left pad a string with zeros or a specified string. Fastest implementation.
  33. * [pad-right](https://github.com/jonschlinkert/pad-right): Right pad a string with zeros or a specified string. Fastest implementation.
  34. * [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string.
  35. * [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length.
  36. ## Running tests
  37. Install dev dependencies:
  38. ```sh
  39. $ npm i -d && npm test
  40. ```
  41. ## Contributing
  42. Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/pascalcase/issues/new)
  43. ## Author
  44. **Jon Schlinkert**
  45. + [github/jonschlinkert](https://github.com/jonschlinkert)
  46. + [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
  47. ## License
  48. Copyright © 2015 Jon Schlinkert
  49. Released under the MIT license.
  50. ***
  51. _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 19, 2015._