I've released some code that will allow you to merge JavaScript objects together, it also handles merging array and function objects as well. So say you've defined a function or created an array, then added properties to it. Normally there's no way to merge a function or array together and keep the properties defined directly on it but now there is. Heck, you can even merge a function and an array together. You could merge an array with and object and a function! The sky is the limit and object-merge makes it easy to reach. Check out the code from github or install it from npmjs.org
npm install object-merge
https://github.com/matthewkastor/object-merge
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.