Skip to content

Instantly share code, notes, and snippets.

View ivan-kleshnin's full-sized avatar
🏠
Working from home

Ivan Kleshnin ivan-kleshnin

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