Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedi4ever/hashmerge
Deep merges hash into a new object
https://github.com/jedi4ever/hashmerge
Last synced: about 1 month ago
JSON representation
Deep merges hash into a new object
- Host: GitHub
- URL: https://github.com/jedi4ever/hashmerge
- Owner: jedi4ever
- Created: 2013-08-01T11:13:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-13T08:48:39.000Z (over 11 years ago)
- Last Synced: 2024-10-05T11:03:55.717Z (3 months ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Description
A utility to merge 2 hash objects into a new object.With this we address:
- avoid changing existing hashes (kinda like clone)
- able to deep merge
- merge values from 2 hashes at same keysvar hashmerge = require('hashmerge');
var h1 = { log: { level: 'debug', mute: true}};
var h2 = { log: { level: 'info, color: true} , port: 33};
var h3 = hashmerge(h1,h2);-> h3 = { log: { level:'info', mute: true, color: true} , port: 33};
## Usage:
see [tests](test/hashmerge) for usage and abilities