made with requirebin
Created
March 12, 2014 05:56
-
-
Save KoryNunn/9501628 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // require something | |
| window.WM1 = require('weakmap'); | |
| window.WM2 = require('weak-map'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require=function e(t,n,r){function o(i,a){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!a&&c)return c(i,!0);if(u)return u(i,!0);throw Error("Cannot find module '"+i+"'")}var f=n[i]={exports:{}};t[i][0].call(f.exports,function(e){var n=t[i][1][e];return o(n?n:e)},f,f.exports,e,t,n,r)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;r.length>i;i++)o(r[i]);return o}({wsZaMq:[function(e,t){(function(){"use strict";function e(t){t.permitHostObjects___&&t.permitHostObjects___(e)}function n(e){return!(e.substr(0,v.length)==v&&"___"===e.substr(e.length-3))}function r(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[_];return t&&t.key===e?t:p(e)?(t={key:e},l(e,_,{value:t,writable:!1,enumerable:!1,configurable:!1}),t):void 0}function o(e){return e.prototype=null,Object.freeze(e)}function u(){d||"undefined"==typeof console||(d=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}if("undefined"==typeof ses||!ses.ok||ses.ok()){"undefined"!=typeof ses&&(ses.weakMapPermitHostObjects=e);var i=!1;if("function"==typeof WeakMap){var a=WeakMap;if("undefined"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var c=new a,f=Object.freeze({});if(c.set(f,1),1===c.get(f))return t.exports=WeakMap,void 0;i=!0}}Object.prototype.hasOwnProperty;var s=Object.getOwnPropertyNames,l=Object.defineProperty,p=Object.isExtensible,v="weakmap:",_=v+"ident:"+Math.random()+"___";if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var y=new ArrayBuffer(25),b=new Uint8Array(y);crypto.getRandomValues(b),_=v+"rand:"+Array.prototype.map.call(b,function(e){return(e%36).toString(36)}).join("")+"___"}if(l(Object,"getOwnPropertyNames",{value:function(e){return s(e).filter(n)}}),"getPropertyNames"in Object){var h=Object.getPropertyNames;l(Object,"getPropertyNames",{value:function(e){return h(e).filter(n)}})}(function(){var e=Object.freeze;l(Object,"freeze",{value:function(t){return r(t),e(t)}});var t=Object.seal;l(Object,"seal",{value:function(e){return r(e),t(e)}});var n=Object.preventExtensions;l(Object,"preventExtensions",{value:function(e){return r(e),n(e)}})})();var d=!1,w=0,O=function(){function e(e,t){var n,o=r(e);return o?f in o?o[f]:t:(n=a.indexOf(e),n>=0?c[n]:t)}function t(e){var t=r(e);return t?f in t:a.indexOf(e)>=0}function n(e,t){var n,o=r(e);return o?o[f]=t:(n=a.indexOf(e),n>=0?c[n]=t:(n=a.length,c[n]=t,a[n]=e)),this}function i(e){var t,n,o=r(e);return o?f in o&&delete o[f]:(t=a.indexOf(e),0>t?!1:(n=a.length-1,a[t]=void 0,c[t]=c[n],a[t]=a[n],a.length=n,c.length=n,!0))}this instanceof O||u();var a=[],c=[],f=w++;return Object.create(O.prototype,{get___:{value:o(e)},has___:{value:o(t)},set___:{value:o(n)},delete___:{value:o(i)}})};O.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},"delete":{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof a?function(){function n(){function t(e,t){return s?f.has(e)?f.get(e):s.get___(e,t):f.get(e,t)}function n(e){return f.has(e)||(s?s.has___(e):!1)}function r(e){var t=!!f["delete"](e);return s?s.delete___(e)||t:t}this instanceof O||u();var c,f=new a,s=void 0,l=!1;return c=i?function(e,t){return f.set(e,t),f.has(e)||(s||(s=new O),s.set(e,t)),this}:function(e,t){if(l)try{f.set(e,t)}catch(n){s||(s=new O),s.set___(e,t)}else f.set(e,t);return this},Object.create(O.prototype,{get___:{value:o(t)},has___:{value:o(n)},set___:{value:o(c)},delete___:{value:o(r)},permitHostObjects___:{value:o(function(t){if(t!==e)throw Error("bogus call to permitHostObjects___");l=!0})}})}i&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=O.prototype,t.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=O)}})()},{}],"weak-map":[function(e,t){t.exports=e("wsZaMq")},{}]},{},[]),require=function e(t,n,r){function o(i,a){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!a&&c)return c(i,!0);if(u)return u(i,!0);throw Error("Cannot find module '"+i+"'")}var f=n[i]={exports:{}};t[i][0].call(f.exports,function(e){var n=t[i][1][e];return o(n?n:e)},f,f.exports,e,t,n,r)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;r.length>i;i++)o(r[i]);return o}({PycAB7:[function(e,t,n){void function(e,r,o){function u(e,t,n){return"function"==typeof t&&(n=t,t=i(n).replace(/_$/,"")),f(e,t,{configurable:!0,writable:!0,value:n})}function i(e){return"function"!=typeof e?"":"name"in e?e.name:s.call(e).match(v)[1]}function a(e){function t(t,r){return r||2===arguments.length?n.set(t,r):(r=n.get(t),r===o&&(r=e(t),n.set(t,r))),r}var n=new y;return e||(e=b),t}var c=Object.getOwnPropertyNames,f=Object.defineProperty,s=Function.prototype.toString,l=Object.create,p=Object.prototype.hasOwnProperty,v=/^\n?function\s?(\w*)?_?\(/,_=function(){function e(){var e=i(),r={};this.unlock=function(o){var u=s(o);if(p.call(u,e))return u[e](r);var i=l(null,t);return f(u,e,{value:Function("s","l",n)(r,i)}),i}}var t={value:{writable:!0,value:o}},n="return function(k){if(k===s)return l}",r=l(null),i=function(){var e=Math.random().toString(36).slice(2);return e in r?i():r[e]=e},a=i(),s=function(e){if(p.call(e,a))return e[a];if(!Object.isExtensible(e))throw new TypeError("Object must be extensible");var t=l(null);return f(e,a,{value:t}),t};return u(Object,function(e){var t=c(e);return p.call(e,a)&&t.splice(t.indexOf(a),1),t}),u(e.prototype,function(e){return this.unlock(e).value}),u(e.prototype,function(e,t){this.unlock(e).value=t}),e}(),y=function(t){function n(t){return this===e||null==this||this===n.prototype?new n(t):(v(this,new _),b(this,t),o)}function a(e){p(e);var t=y(this).get(e);return t===r?o:t}function c(e,t){p(e),y(this).set(e,t===o?r:t)}function f(e){return p(e),y(this).get(e)!==o}function s(e){p(e);var t=y(this),n=t.get(e)!==o;return t.set(e,o),n}function l(){return y(this),"[object WeakMap]"}var p=function(e){if(null==e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Invalid WeakMap key")},v=function(e,n){var r=t.unlock(e);if(r.value)throw new TypeError("Object is already a WeakMap");r.value=n},y=function(e){var n=t.unlock(e).value;if(!n)throw new TypeError("WeakMap is not generic");return n},b=function(e,t){null!==t&&"object"==typeof t&&"function"==typeof t.forEach&&t.forEach(function(n,r){n instanceof Array&&2===n.length&&c.call(e,t[r][0],t[r][1])})};try{var h=("return "+s).replace("e_","\\u0065"),d=Function("unwrap","validate",h)(y,p)}catch(w){var d=s}var h=(""+Object).split("Object"),O=function l(){return h[0]+i(this)+h[1]};u(O,O);var g={__proto__:[]}instanceof Array?function(e){e.__proto__=O}:function(e){u(e,O)};return g(n),[l,a,c,f,d].forEach(function(e){u(n.prototype,e),g(e)}),n}(new _),b=Object.create?function(){return Object.create(null)}:function(){return{}};t!==o?t.exports=y:n!==o?n.WeakMap=y:"WeakMap"in e||(e.WeakMap=y),y.createStorage=a,e.WeakMap&&(e.WeakMap.createStorage=a)}((0,eval)("this"))},{}],weakmap:[function(e,t){t.exports=e("PycAB7")},{}]},{},[]),window.WM1=require("weakmap"),window.WM2=require("weak-map"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "requirebin-sketch", | |
| "version": "1.0.0", | |
| "dependencies": { | |
| "weak-map": "1.0.3", | |
| "weakmap": "0.0.6" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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