tool-belt

1.0.1 • Public • Published

tool-belt

Soon to be born js utility library. This library will be undergoing major changes soon.

Requires jquery for client functions.

For now

$ npm install tool-belt
let toolBelt = require('tool-belt');
 
toolBelt.trunc('Hello World', 5); // He...

Available functions as of right now

  • app
    • get register a get based express function
    • post register a post based express function
  • hash java like hash of a string
  • print prints and returns
  • trunc truncates strings with elipses
  • extend extends an object
  • constructor Correctly set an object's constructor
  • once return a function that can only run once
  • server return a function that can only run on node
  • client return a function that can only be run on the the client
  • dataEqual compare two data sets
  • dataCopy copy a data set
  • intersects check if two arrays intersect
  • unique removes all duplicates and returns a new array
  • flatten flattens an array
  • untilStable runs a function until it no longer calls the given callback
  • nop no operation,
  • redirect client redirect with delay

Readme

Keywords

none

Package Sidebar

Install

npm i tool-belt

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • ejrbuss