0.1.2 • Published 8 years ago

rjr-helper v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

rjr-helper

Installation

> npm install -save rjr-helper

Import

const helper = require('rjr-helper')

API Reference

Array

array.filter(data,callback)

data : Object

  data - data (array)

  limit - array (string) eg : ['2-3']

  equality - true/false

Example :

helper.array.filter({
  data : _data,
  limit : ['3-6'],
  equality : true
},function(err,data){
  conole.log(data)
});

array.dimension(array,callback)

Example :

helper.array.dimension([1,2,3],function(err,data){
  console.log(data)
});

Object

object.filter(data,callback)

data : Object

  data - object (array) eg : [{...},{...}]

  get - array (string) eg : ['name','city']

  take - number | optional

Example :

helper.object.filter({
  data : data,
  get : ['name'],
  take : 2
},function(err,data){
  console.log(data)
});

object.isNested(data,callback)

data : Object

Example :

object.isNested(data,function(err,data){
  console.log(data)
});

object.leaf(data,callback)

data : Object

Example :

object.leaf(data,function(err,data){
  console.log(data)
});

object.removeNegative(data,callback)

data : Object

Example :

object.isNested(data,function(err,data){
  console.log(data)
});

CLI (Print colorfull text on console)

Print

  • 'message' : string and print function is wrapped with console.log()

    • print.fcyan(message)

    • print.fblack(message)

    • print.fyellow(message)

    • print.fblue(message)

    • print.fmagenta(message)

    • print.fcyan(message)

    • print.fwhite(message)

License

(MIT, Apache, etc.)

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.1

8 years ago

0.0.2

8 years ago

0.0.0

8 years ago