Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samrocksc/jsoncrement
jsoncrement
https://github.com/samrocksc/jsoncrement
database increment incremental json
Last synced: 19 days ago
JSON representation
jsoncrement
- Host: GitHub
- URL: https://github.com/samrocksc/jsoncrement
- Owner: samrocksc
- Created: 2017-01-15T18:09:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-25T05:42:31.000Z (almost 8 years ago)
- Last Synced: 2024-12-12T11:43:55.215Z (22 days ago)
- Topics: database, increment, incremental, json
- Language: JavaScript
- Homepage:
- Size: 501 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Iterating Objects.
## Why I made it
I made this module primarily because I really like flat file databases....specifically [lowdb](https://github.com/typicode/lowdb). I wanted to take a flat file field and create a very easily iterated field. So if you DO want an incremented field for sorting or what have you, you can create it. Due to the fact that flat files are not RDMS, this had to be done in a less-efficient, but still usable way for small projects. Enter JSONcrementer. The goal was to increment an 'id' field of your choice.
Obviously a more efficient method would be to create a sequencing file with each json object, and have an updated sequence. Perhaps I'll get around to doing that in the future.
For right now this will suit my needs.
## Examples
Check out `example.js` to see a working example of this library## How do I use it
```
iterate([iteratingObject], [fieldToIterate], [objectToAppend])
```## Who uses this?
Anyone who wants to easily increment a json object.....this could be used for creating a sortable object.