This package is the implementation of allmost methods found in the You don't (may not) need Lodash/Underscore
npm install basic-func
List with implemented methods.
- chunck
- compact
- difference
- flatten
- flattenDeep
- fromPairs
- intersection
- takeRight
- without
- groupBy
- keyBy
- maxBy
- minBy
- sample
- sortBy
- uniq
- debounce
- partial
- throttle
- isEmpty
- inRange
- random
- randomInt
- extend
- get
- omit
- pick
- pickBy
- capitalize
- onlyNumbers
- upperFirst
This methods are not implemented because they are implemented in native javascript and are easy to use without any lib.
- concat
- drop
- dropRight
- fill
- find
- findIndex
- first
- fromPairs
- head
- tail
- indexOf
- reverse
- slice
- each
- every
- filter
- includes
- map
- pluck
- range
- reduce
- reduceRight
- size
- after
- bind
- gt
- gte
- isFinite
- isInteger
- isNaN
- isNil
- isNull
- isUndefined
- assign
- keys
- omit
- toPairs
- values
- endsWith
- padStart
- padEnd
- repeat
- replace
- split
- startsWith
- template
- toLower
- toUpper
- trim
- inRange
- random
This methods are not inclued in original version
-
capitalize
Transform all first letter in upper in every word in a given string
-
onlyNumber
Get only numbers from a given string
Install depedencies
npm i
To test
npm run test
To build
npm run build
the build files will be in /lib