A force-directed graph using images as nodes, with accompanying text labels.
zip -0Xq my-book.epub mimetype | |
zip -Xr9Dq my-book.epub * |
var obj = { | |
a: 1, | |
get b(){ return 2 }, | |
c: 3 | |
} | |
Object.defineProperty(obj, 'c', {configurable: false, writable: false}); | |
function clone(o){ | |
var c = Object.create(Object.getPrototypeOf(o)); |
Reviewing this version
Which browsers are targeted?
Would you consider making an AMD or UMD module instead of exporting to the global?
Copyright legislation in most countries provide content producers and distributors with the right to decide how what they've created is expected to be distributed. They can put any sort of restriction, like expect that if people share it, the work has to be shared unmodified. Another restriction would to credit the author when sharing, etc.
var win = gBrowser.selectedBrowser.contentWindow; | |
var console = win.console; | |
var P = Object.getPrototypeOf; | |
Components.utils.import("resource://gre/modules/jsdebugger.jsm").addDebuggerToGlobal(this); | |
//console.log(Debugger) | |
var dbg = new Debugger(); | |
var dbgwin = dbg.addDebuggee(win) | |
//console.log(dbgwin) |
var MAX = 10; | |
var times = []; | |
var now = performance.now.bind(performance) | |
for(var i=0; i<MAX; i++){ | |
setTimeout(function f(){ | |
times.push(now()); | |
}, 0); | |
} |
(function(){ | |
var a = []; | |
for(var i = 0 ; i < 10000 ; i++){ | |
a.push({ | |
entryType : Math.random() < 0.001 ? 'resource' : 'mark', | |
name: 'yo', | |
startTime : performance.now(), | |
duration: 0 | |
}) |
// Nothing here -- never executed. => Why a function then? Is it ever used even as a constructor? If not, a singleton might be what you need.
isPrototypeOf => Why not instanceof?
"Could as well be defined as an interface" => There is this TypeScript thing. You should check it out ;-)