Skip to content

Instantly share code, notes, and snippets.

@artdude543
Last active March 15, 2017 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artdude543/c24ee80cc713860066a0c24e54c5f8a6 to your computer and use it in GitHub Desktop.
Save artdude543/c24ee80cc713860066a0c24e54c5f8a6 to your computer and use it in GitHub Desktop.
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
async function testing() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve('I did stuff.');
}, 5000);
});
}
async function boot() {
console.log(await testing());
}
boot();
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