0.0.7 • Published 7 years ago
cremma v0.0.7
cremma
Utility functions for Javascript with a preference for immutability
Check the docs for available functions
Use
Install in your project
npm i --save cremma
Import modules wherever you want to use them
import { object } from 'cremma'
const sampleObject = {
hi: 'there',
i: {
have: {
some: 'data',
},
also: ['a', 'array'],
},
}
const newObject = object.digAndPut(sampleObject, ['i', 'also', '0'], 'an')
// #=>
// {
// hi: 'there',
// i: {
// have: {
// some: 'data',
// },
// also: ['an', 'array'],
// },
// }
Development
Clone and enter the repo, and install deps
git clone https://github.com/MainShayne233/cremma.git
cd cremma
npm i
and make changes in src
Commands
npm run test
: Runs testsnpm run test:watch
: Starts test watcher; will run test suite when changes are madenpm run build
: Buildsindex.js
for distribution/client usenpm run start
: Starts a developer server, running at localhost:4000, where you can exercise/demo your code