0.1.2 • Published 6 years ago
utililty-kit v0.1.2
Utilities
typeOf ⇒ String
A better way of checking JavaScript types.
Param | Type |
---|---|
obj | Any |
isEmpty ⇒ Boolean
Checks if a value is empty.
Param | Type |
---|---|
object | Any |
deepPath ⇒ Any
Access deep properties inside a JSON data using path
Param | Type |
---|---|
path | Array |
object | JSON |
mapOnObject ⇒ Array
Map on an object data, iteratee is the function invoked per iteration.
Param | Type |
---|---|
object | Object |
iteratee | function |
pluralize ⇒ String
Pluralizes a word based on the value of count.
Param | Type |
---|---|
count | Number |
text | String |
suffix | String |
toProperCase ⇒ String
Changes a given string to sentence case.
Param | Type |
---|---|
str | String |
safeInvoke ⇒ Any
Safely invoke the function with the given arguments, if it is indeed a function, and return its value.
Param | Type |
---|---|
func | function |
args | Any |
isValidEmail ⇒ Boolean
Checks if an email is valid
Param | Type |
---|---|
String |
Build
yarn build
This will transpile and build files for cjs
and es
environments.
The dist
folder will have bundled version of the library
The lib
folder will have transpiled version of the library targeting es
module system.
License
MIT © Darpan Kakadia