Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laynef/lodash-prototypes
https://github.com/laynef/lodash-prototypes
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/laynef/lodash-prototypes
- Owner: laynef
- Created: 2019-07-12T00:14:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-10T01:03:30.000Z (over 3 years ago)
- Last Synced: 2023-03-02T22:42:25.689Z (over 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
``` javascript
require('lodash-prototypes');
```Babel ES6+
``` javascript
import 'lodash-prototypes';
```## Usage
String Example:
``` javascript
'helloWorld'.startCase() === 'Hello World'
```Available string methods
1. camelCase
1. capitalize
1. deburr
1. escape
1. escapeRegExp
1. kebabCase
1. lowerCase
1. lowerFirst
1. pad
1. snakeCase
1. startCase
1. template
1. toLower
1. toUpper
1. truncate
1. unescape
1. upperCase
1. upperFirst
1. wordsArray Example:
``` javascript
[1,2,2].uniq() // [1,2]
```Available array methods
1. chunk
1. compact
1. difference
1. differenceBy
1. differenceWith
1. drop
1. dropRight
1. dropRightWhile
1. dropWhile
1. fill
1. findIndex
1. findLastIndex
1. first
1. flatten
1. flattenDeep
1. flattenDepth
1. fromPairs
1. head
1. initial
1. intersection
1. intersectionBy
1. intersectionWith
1. last
1. lastIndexOf
1. nth
1. pull
1. pullAll
1. pullAllBy
1. pullAllWith
1. pullAt
1. remove
1. sortedIndex
1. sortedIndexBy
1. sortedIndexOf
1. sortedLastIndex
1. sortedLastIndexBy
1. sortedLastIndexOf
1. tail
1. take
1. takeRight
1. takeRightWhile
1. takeWhile
1. union
1. unionBy
1. unionWith
1. uniq
1. uniqBy
1. uniqWith
1. unzip
1. unzipWith
1. without
1. xor
1. xorBy
1. xorWith
1. zip
1. zipObject
1. zipObjectDeep
1. zipWithHappy Coding!