Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dsys/kibble
:rice: Useful JavaScript utilities
https://github.com/dsys/kibble
Last synced: about 1 month ago
JSON representation
:rice: Useful JavaScript utilities
- Host: GitHub
- URL: https://github.com/dsys/kibble
- Owner: dsys
- License: bsd-3-clause
- Created: 2015-11-23T07:15:08.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-06T04:29:19.000Z (almost 9 years ago)
- Last Synced: 2024-11-07T05:46:28.480Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://github.com/pavlovml/kibble
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kibble
[![TravisCI shield](https://img.shields.io/travis/pavlovml/kibble.svg)](https://travis-ci.org/pavlovml/kibble) [![npm shield](https://img.shields.io/npm/v/kibble.svg)](https://www.npmjs.com/package/kibble) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
Useful JavaScript utilities.
## Installation
$ npm install kibble --save
## Usage
```javascript
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](https://github.com/feross/standard), [Babel](https://babeljs.io/) for ES6+ support, and [Jest](http://facebook.github.io/jest/) for testing.
$ git clone [email protected]:pavlovml/kibble.git
$ npm testTo run the tests on file changes:
$ npm test -- --watch
## License
[BSD 3-Clause](https://github.com/pavlovml/kibble/blob/master/LICENSE)