Collection of low level Javascript helper functions targeting language primitives and native objects

Use @fiverr/futile instead
Last updated 3 years ago by omrilotan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @fiverr/commodity 
SYNC missed versions from official npm registry.


Collection of low level Javascript helper functions targeting language primitives and native objects

build status pull requests issues npm package Codacy Badge

Use commodity Documentation

Import the library

const commodity = require('@fiverr/commodity');

commodity.shuffle([1, 2, 3]);
commodity.interpolate('Hello, ${name}', {name: 'Martin'});

Import individual methods

const shuffle = require('@fiverr/commodity/lib/shuffle');
const interpolate = require('@fiverr/commodity/lib/interpolate');

shuffle([1, 2, 3]);
interpolate('Hello, ${name}', {name: 'Martin'});

Working with commodity repo


The "playground" directory is a place you can write test modules, and include commodity as a module. It's node_modules contains a symlink to the parent directory so you're working with your actual work files.

The content of this directory is gitignored (short of example file and commodity virtual module) so feel free to add your sandbox files there

Tests and builds

Lint code

npm run lint

Test all

npm test

Test one

npm run testone lib/string/interpolate

Rebuild docs

npm run doc

Contributing to commodity repo

Each module contains an index file - the exported module, and a test file. Modules should be commented in JSDoc so the automated documentation is up to date.

Each collection (e.g. str, arr) needs to expose all it's modules, and lib should expose all collections.

Pro git tip: Push to master with the new docs submodule

git push origin master --recurse-submodules=on-demand

Version management

The version number specify major.minor.patch

Type Content Example
patch Internal fix Performance updates, tests, small tweaks
minor Interface change with full backward compatibility Adding a new function, Bug fix
major Interface change without full backward compatibility Changing a function name or output, Removing a function

Current Tags

  • 1.1.0                                ...           latest (3 years ago)

6 Versions

  • 1.1.0 [deprecated]           ...           3 years ago
  • 1.0.2 [deprecated]           ...           3 years ago
  • 1.0.1 [deprecated]           ...           3 years ago
  • 1.0.0 [deprecated]           ...           3 years ago
  • 0.0.3 [deprecated]           ...           3 years ago
  • 0.0.2 [deprecated]           ...           3 years ago
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 6
Last Month 1
Dependencies (0)
Dev Dependencies (7)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |