Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Common imports

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.editorconfig
.gitignore
.jshintrc
.travis.yml
AUTHORS
CONTRIBUTING.md
LICENSE
Makefile
README.md
browser.js
changelog.sh
index.js
package.json
test.js

README.md

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

Something went wrong with that request. Please try again.