https://github.com/doowb/expand-hash
Recursively expands property keys with dot-notation into objects.
https://github.com/doowb/expand-hash
config-values dot-notation expand hash javascript keys nested-objects object objects
Last synced: 8 days ago
JSON representation
Recursively expands property keys with dot-notation into objects.
- Host: GitHub
- URL: https://github.com/doowb/expand-hash
- Owner: doowb
- License: mit
- Created: 2014-03-22T20:40:33.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-05-15T19:55:27.000Z (almost 7 years ago)
- Last Synced: 2024-10-29T23:28:54.488Z (6 months ago)
- Topics: config-values, dot-notation, expand, hash, javascript, keys, nested-objects, object, objects
- Language: JavaScript
- Homepage: https://github.com/doowb/expand-hash
- Size: 27.3 KB
- Stars: 24
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# expand-hash [](https://www.npmjs.com/package/expand-hash) [](https://npmjs.org/package/expand-hash) [](https://npmjs.org/package/expand-hash) [](https://travis-ci.org/doowb/expand-hash)
> Recursively expands property keys with dot-notation into objects.
Please consider following this project's author, [Brian Woodward](https://github.com/doowb), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save expand-hash
```## Usage
```js
const expand = require('expand-hash');
const obj = {
'foo.bar.bar': 'some value',
'foo.qux': 'another value',
fez: true
};console.log(expand(obj));
// {
// foo: { bar: { bar: 'some value' }, qux: 'another value' },
// fez: true
// }
```## About
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Running Tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```### Related projects
* [expand-object](https://www.npmjs.com/package/expand-object): Expand a string into a JavaScript object using a simple notation. Use the CLI or… [more](https://github.com/jonschlinkert/expand-object) | [homepage](https://github.com/jonschlinkert/expand-object "Expand a string into a JavaScript object using a simple notation. Use the CLI or as a node.js lib.")
* [stringify-keys](https://www.npmjs.com/package/stringify-keys): Build an array of key paths from an object. | [homepage](https://github.com/doowb/stringify-keys "Build an array of key paths from an object.")### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 19 | [doowb](https://github.com/doowb) |
| 8 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [cconrad](https://github.com/cconrad) |### Author
**Brian Woodward**
* [LinkedIn Profile](https://linkedin.com/in/woodwardbrian)
* [GitHub Profile](https://github.com/doowb)
* [Twitter Profile](https://twitter.com/doowb)### License
Copyright © 2018, [Brian Woodward](https://github.com/doowb).
Released under the [MIT License](LICENSE).***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 15, 2018._