Neutron Polarization Manipulator
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    thingspublic

    Things

    Build Status

    NPM

    Things is a simple CommonJS module that exports commonly used utilities and a set of best of breed selected 3rd party utility modules. It purely exists to avoid having several lines of boilerplate imports in every file and is designed to be used with the destructuring syntax from CoffeScript or JavaScript ES6. Modules are lazy loaded so they only add delay once they are used.

    Also works in the browser via Browserify with a minimal set of utilities that make sense on the client.

    Install

    npm install --save things
    

    Usage

    Just import whatever you need.

    In JavaScript ES6,

    {path, fs, util, crypto, _, moment} = require('things');

    or in Coffee-Script

    {assert, _} = require 'things'

    or in JS5

    var things = require('things');
    things._(...);
    things.fs(...); 

    vs

    var fs = require('fs');
    var url = require('url');
    var _ = require('lodash');
    var moment = require('moment');
    var async = require('async');
    ...

    Includes

    Builtins exported for convienence

    • assert
    • util
    • fs
    • path
    • url
    • querystring
    • crypto

    Third Party modules

    Underscore related

    Browser Version

    The following are only exported for use with browserify

    Contributing

    Create Github issues for all bugs, features & requests. Pull requests are welcome. Make sure tests are included.

    Test

    Test with make test

    License

    BSD 3-Clause

    Keywords

    install

    npm i things

    Downloadsweekly downloads

    55

    version

    1.1.0

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar