@ri7nz/common

0.0.2 • Public • Published

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 Any
  • Anymore 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

  • obj Object to find value in this object
  • prop String property name in obj

Returns Any value in object by property name

Readme

Keywords

none

Package Sidebar

Install

npm i @ri7nz/common

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

20 kB

Total Files

12

Last publish

Collaborators

  • ri7nz