Skip to content

dsys/kibble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kibble

TravisCI shield npm shield js-standard-style

Useful JavaScript utilities.

Installation

$ npm install kibble --save

Usage

import { invariant, hash } from 'kibble'

// Specify runtime invariants.
invariant(2 + 2 === 4, "I'm sorry Dave, I'm afraid I can't do that.")
invariant.equal(2 + 2, 4, "Daisy, Daisy, give me your answer do.")
invariant.fail("I'm afraid. I'm afraid, Dave. Dave, my mind is going.")

// Generate deterministic hashes for JSON values.
hash({ foo: 'bar', baz: 'qux' }) // => 'e206c130fcd88e647754337f071e98097d80a408c25a40ca61d3fb2d06c7dc47'

// More coming soon...

Development

Kibble uses JavaScript Standard Style, Babel for ES6+ support, and Jest for testing.

$ git clone [email protected]:pavlovml/kibble.git
$ npm test

To run the tests on file changes:

$ npm test -- --watch

License

BSD 3-Clause