1.1.0 • Published 6 years ago

blackstone-util v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Utility functions, classes, and extensions

version

A group of useful utilities. Import them all or include them as you need.

Install & Use

npm install blackstone-util

// all functions
var util = require('blackstone-util')

// single function
import plural from 'blackstone-util'

Array Additions

The array additions modify the stock array object so you must opt in to them by importing them separately.

require('util/array')

var a = []
a.pushUniq(1)
a.pushUniq(1)
console.log(a) // [1]

Classes

ISBN('isbn')

import ISBN from 'blackstone-util'

let isbn = new ISBN('978-1-5385-0785-8')
isbn.isValid
isbn.to13
isbn.to10 
isbn.formatted

// or static
ISBN.isValid('978-1-5385-0785-8')

Changelog

v1.1.0

  • num in plural() can be an object/array and the number will be retrieved
1.1.0

6 years ago

1.0.0

6 years ago