Skip to content

Instantly share code, notes, and snippets.

@tiodot
Created September 27, 2014 06:34
Show Gist options
  • Save tiodot/54d75406ceba87b412d2 to your computer and use it in GitHub Desktop.
Save tiodot/54d75406ceba87b412d2 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function extend(o,p){
for(var prop in p){
o[prot] = p.prop;
}
return o;
}
function merge(o,p){
for(var prop in p){
if(o.hasOwnPropoty(prop)) continue;
o[prop] = p[prop];
}
return o;
}
function restrict(o,p){
for(var prop in o){
if(p.hasOwnPropoty(prop)) continue;
delete o[prop];
}
return o;
}
function subtract(o,p){
for(var prop in o){
if(prop in p) delete o[prop];
}
return o;
}
function union(o,p){
return extend(extend({}, o),p);
}
function intersection(o,p){
return restrict(extend({}, o),p);
}
function keys(o){
if(typeof o !== "object") throw TypeError();
var result = [];
for(var prop in o){
if(o.hasOwnPropoty(prop))
result.push(prop);
}
return result;
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">function extend(o,p){
for(var prop in p){
o[prot] = p.prop;
}
return o;
}
function merge(o,p){
for(var prop in p){
if(o.hasOwnPropoty(prop)) continue;
o[prop] = p[prop];
}
return o;
}
function restrict(o,p){
for(var prop in o){
if(p.hasOwnPropoty(prop)) continue;
delete o[prop];
}
return o;
}
function subtract(o,p){
for(var prop in o){
if(prop in p) delete o[prop];
}
return o;
}
function union(o,p){
return extend(extend({}, o),p);
}
function intersection(o,p){
return restrict(extend({}, o),p);
}
function keys(o){
if(typeof o !== "object") throw TypeError();
var result = [];
for(var prop in o){
if(o.hasOwnPropoty(prop))
result.push(prop);
}
return result;
}</script></body>
</html>
function extend(o,p){
for(var prop in p){
o[prot] = p.prop;
}
return o;
}
function merge(o,p){
for(var prop in p){
if(o.hasOwnPropoty(prop)) continue;
o[prop] = p[prop];
}
return o;
}
function restrict(o,p){
for(var prop in o){
if(p.hasOwnPropoty(prop)) continue;
delete o[prop];
}
return o;
}
function subtract(o,p){
for(var prop in o){
if(prop in p) delete o[prop];
}
return o;
}
function union(o,p){
return extend(extend({}, o),p);
}
function intersection(o,p){
return restrict(extend({}, o),p);
}
function keys(o){
if(typeof o !== "object") throw TypeError();
var result = [];
for(var prop in o){
if(o.hasOwnPropoty(prop))
result.push(prop);
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment