A module for merging two objects and making sure that the types match.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.gitignore
LICENSE
README.md
merge.js
package.json

README.md

sol-merge

A module for merging two objects and making sure that the types match.

Install

npm install sol-merge

Method: merge(source, objectToCopyFrom)

Example

var merge = require('sol-merge')

var DEFAULT_SETTINGS = {
  application: "A Demo.",
  port: 3000
}

var USER_SETTINGS = {
  port: "80", // This should not merge...
  application: "A very cool demo."
}

var applicationSettings = merge(DEFAULT_SETTINGS, USER_SETTINGS)