lodash-prototypes
v0.3.1
Published
Add your favorite Lodash methods for Arrays & Strings Because JavaScript should have them by default.
Downloads
8
Readme
Lodash Prototypes
Add your favorite Lodash methods for Arrays & Strings Because JavaScript should have them by default.
Installation
Import package once on your node server and/or client JavaScript bundle.
Node.js
require('lodash-prototypes');
Babel ES6+
import 'lodash-prototypes';
Usage
String Example:
'helloWorld'.startCase() === 'Hello World'
Available string methods
- camelCase
- capitalize
- deburr
- escape
- escapeRegExp
- kebabCase
- lowerCase
- lowerFirst
- pad
- snakeCase
- startCase
- template
- toLower
- toUpper
- truncate
- unescape
- upperCase
- upperFirst
- words
Array Example:
[1,2,2].uniq() // [1,2]
Available array methods
- chunk
- compact
- difference
- differenceBy
- differenceWith
- drop
- dropRight
- dropRightWhile
- dropWhile
- fill
- findIndex
- findLastIndex
- first
- flatten
- flattenDeep
- flattenDepth
- fromPairs
- head
- initial
- intersection
- intersectionBy
- intersectionWith
- last
- lastIndexOf
- nth
- pull
- pullAll
- pullAllBy
- pullAllWith
- pullAt
- remove
- sortedIndex
- sortedIndexBy
- sortedIndexOf
- sortedLastIndex
- sortedLastIndexBy
- sortedLastIndexOf
- tail
- take
- takeRight
- takeRightWhile
- takeWhile
- union
- unionBy
- unionWith
- uniq
- uniqBy
- uniqWith
- unzip
- unzipWith
- without
- xor
- xorBy
- xorWith
- zip
- zipObject
- zipObjectDeep
- zipWith
Happy Coding!