Last active
March 15, 2017 18:28
-
-
Save artdude543/c24ee80cc713860066a0c24e54c5f8a6 to your computer and use it in GitHub Desktop.
This file contains 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
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
function testing() { | |
return __awaiter(this, void 0, void 0, function* () { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve('I did stuff.'); | |
}, 5000); | |
}); | |
}); | |
} | |
function boot() { | |
return __awaiter(this, void 0, void 0, function* () { | |
console.log(yield testing()); | |
}); | |
} | |
boot(); | |
//# sourceMappingURL=test.js.map |
This file contains 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
async function testing() { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve('I did stuff.'); | |
}, 5000); | |
}); | |
} | |
async function boot() { | |
console.log(await testing()); | |
} | |
boot(); |
This file contains 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
const keys = Object.keys(this.rethink.models); | |
for (let i = 0, length = keys.length; i < length; i++) { | |
const model = this.rethink.models[keys[i]]; | |
model..... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment