Initial commit 🚀

This commit is contained in:
Jonas Schmedtmann
2019-06-13 15:43:15 +01:00
commit 7f81af0ddf
1052 changed files with 2123177 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
const fs = require("fs");
const crypto = require("crypto");
const start = Date.now();
process.env.UV_THREADPOOL_SIZE = 4;
setTimeout(() => console.log("Timer 1 finished"), 0);
setImmediate(() => console.log("Immediate 1 finished"));
fs.readFile("test-file.txt", () => {
console.log("I/O finished");
console.log("----------------");
setTimeout(() => console.log("Timer 2 finished"), 0);
setTimeout(() => console.log("Timer 3 finished"), 3000);
setImmediate(() => console.log("Immediate 2 finished"));
process.nextTick(() => console.log("Process.nextTick"));
crypto.pbkdf2Sync("password", "salt", 100000, 1024, "sha512");
console.log(Date.now() - start, "Password encrypted");
crypto.pbkdf2Sync("password", "salt", 100000, 1024, "sha512");
console.log(Date.now() - start, "Password encrypted");
crypto.pbkdf2Sync("password", "salt", 100000, 1024, "sha512");
console.log(Date.now() - start, "Password encrypted");
crypto.pbkdf2Sync("password", "salt", 100000, 1024, "sha512");
console.log(Date.now() - start, "Password encrypted");
});
console.log("Hello from the top-level code");