cremma
v0.0.7
Published
Helper functions for Javascript objects and stuff
Readme
cremma
Utility functions for Javascript with a preference for immutability
Check the docs for available functions
Use
Install in your project
npm i --save cremmaImport 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 iand 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.jsfor distribution/client usenpm run start: Starts a developer server, running at localhost:4000, where you can exercise/demo your code
