https://github.com/farynaio/object-dot-notation
Simple object to object dot notation converter in Node.js.
https://github.com/farynaio/object-dot-notation
bdd chai chaijs ecmascript2016 es6 functional-programming mocha mochajs node nodejs tdd
Last synced: about 1 month ago
JSON representation
Simple object to object dot notation converter in Node.js.
- Host: GitHub
- URL: https://github.com/farynaio/object-dot-notation
- Owner: farynaio
- License: bsd-2-clause
- Created: 2017-10-24T18:58:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-24T19:21:47.000Z (over 7 years ago)
- Last Synced: 2025-02-01T17:44:57.222Z (3 months ago)
- Topics: bdd, chai, chaijs, ecmascript2016, es6, functional-programming, mocha, mochajs, node, nodejs, tdd
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Object dot notation converter
This is simple implementation of object to object in dot notation converter.
## What it does
Let me express it by example:
Input:
```
{ a: { b: { c: 1 }, e: 2 }, f: { g: 3, h: 4 }}
```Output:
```
{ 'a.b.c': 1, 'a.e': 2, 'f.g': 3, 'f.h': 4 }
```## How to run it
There is no specific demo code, but you can run tests if you want.
### To run tests
Install dependencies:
```npm i```Run tests:
``` npm test ```Run tests in watch mode:
``` npm run watch ```## Contribution
If you know any ways to make it simpler, faster, better in any way, using ES6+ features (even not disclosed in specification like 'object spread'), without external libraries feel free to do it and send me pull request. Let's make it as good as possible and learn in the process.
##