Skip to content

Instantly share code, notes, and snippets.

Avatar

Ivan Kleshnin ivan-kleshnin

View GitHub Profile
@ivan-kleshnin
ivan-kleshnin / promise.js
Created Jun 19, 2019 — forked from vkarpov15/promise.js
Simple Promises/A+ Compliant Promise
View promise.js
const assert = (v, err) => {
if (!v) {
throw err;
}
};
let counter = 0;
class Promise {
constructor(executor) {