An open API service indexing awesome lists of open source software.

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.

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.

##