@ri7nz/common
v0.0.2
Published
[Utils] Common & Basic JavaScript Function.
Downloads
2
Readme
Documentation
Table of Contents
is
Type data checking on the fly.
Parameters
Any
Examples
const myObject = {x:1, y:3}
const thisIs = is(myObject)
// expect(thisIs).toBe("Object")
Returns Boolean
isEqual
isEqual
is like is
but have 2 parameter for compare 2 type and return Bolean.
Parameters
Anything
AnyAnymore
Any
Returns Boolean
has
checking the property in your object.
Parameters
Examples
const Person = {name: 'John Lennon', band: 'Beatles', genre: "rock n roll"}
has(Person,'name')
Returns Boolean
equal
Compare 2 Object
Parameters
Returns Bool This function for simple json object compare you can't compare specific JSON like NODE Or Dom Object in JSON-Data.
unique
Get Unique value in array.
Parameters
Returns Array new array
getByProp
Get value of object by property name.
Parameters
Returns Any value in object by property name