blackstone-util

1.1.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i blackstone-util

      Weekly Downloads

      2

      Version

      1.1.0

      License

      MIT

      Unpacked Size

      19.3 kB

      Total Files

      21

      Last publish

      Collaborators

      • kjantzer