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 crypto = require("crypto"); | |
getHash = (content) => crypto.createHash("sha256") | |
.update(content) | |
.digest("hex"); | |
var start = Date.now(); | |
// A million hashes take ~3000ms on my Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz. | |
// You might want to increase this value. |
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
class A { | |
String method() => "value"; | |
} | |
class B { | |
A? field; | |
B([this.field]); // Using [] to denote optional parameter. | |
Map<String, String?> toJson() { |