Skip to content

Instantly share code, notes, and snippets.

View lkmill's full-sized avatar
💭
what does this do?

Linus Miller lkmill

💭
what does this do?
View GitHub Profile
@lkmill
lkmill / EventEmitter.js
Created October 18, 2016 11:50
Start of a very barebone reimplemtation of Backbone
import NativeEventEmitter from 'events';
// export default function EventEmitter() {}
// EventEmitter.prototype = Object.create(NativeEventEmitter.prototype);
// Object.assign(EventEmitter.prototype, {
export default function EventEmitter(...args) {
return NativeEventEmitter.call(this, ...args);
}
'use strict'
const chalk = require('chalk')
console._log = console.log
console._dir = console.dir
function extractLocation() {
const obj = {}
Error.captureStackTrace(obj)