Skip to content

Instantly share code, notes, and snippets.

@heymichaelp
Created February 13, 2014 15:38
Show Gist options
  • Save heymichaelp/8977346 to your computer and use it in GitHub Desktop.
Save heymichaelp/8977346 to your computer and use it in GitHub Desktop.
requirebin sketch
var mixin = require('utils-merge');
var foo = { data: { bar: 'baz' } };
var bar = { data: { baz: 'bang' } };
var baz = mixin( foo, bar )
alert(JSON.stringify( baz ) )
require=function e(r,n,t){function i(u,a){if(!n[u]){if(!r[u]){var f="function"==typeof require&&require;if(!a&&f)return f(u,!0);if(o)return o(u,!0);throw Error("Cannot find module '"+u+"'")}var c=n[u]={exports:{}};r[u][0].call(c.exports,function(e){var n=r[u][1][e];return i(n?n:e)},c,c.exports,e,r,n,t)}return n[u].exports}for(var o="function"==typeof require&&require,u=0;t.length>u;u++)i(t[u]);return i}({"cH+GYl":[function(r,e,n){n=e.exports=function(r,e){if(r&&e)for(var n in e)r[n]=e[n];return r}},{}],"utils-merge":[function(r,e){e.exports=r("cH+GYl")},{}]},{},[]);var mixin=require("utils-merge"),foo={data:{bar:"baz"}},bar={data:{baz:"bang"}},baz=mixin(foo,bar);alert(JSON.stringify(baz));
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; }
body, html { height: 100%; width: 100%; }</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment