I hereby claim:
- I am ryzokuken on github.
- I am ryzokuken (https://keybase.io/ryzokuken) on keybase.
- I have a public key ASBZT8DtcTWqN420ttPnntD5WB9sCtOA1zI6XOwa2kTucAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
npm install -g typescript
)tsc simulation.ts -t "esnext" -m "commonjs"
)node simulation.js
)const hash = require('easy-crypto/hash'); | |
class MerkleTreeNodeGeneric { | |
compare(node) { | |
return this.hash === node.hash; | |
} | |
} | |
class MerkleTreeChildNode extends MerkleTreeNodeGeneric { | |
constructor(data) { |
crypto
modulecrypto
isn't simple" (Plug for simple-crypto
/ crypt
)Sample method, Collator.prototype.compare
(https://tc39.github.io/ecma402/#sec-intl.collator.prototype.compare)
collator
be this value.Type(collator)
is not Object, throw a TypeError exception.collator
does not have an [[InitializedCollator]] internal slot, throw a TypeError exception.collator
.[[BoundCompare]] is undefined, then
a. Let F
be a new built-in function object as defined in 10.3.3.1.
b. Set F
.[[Collator]] to collator
.This is a small example that attemps to reproduce the error caused at nodejs/node#20824, possibly due to a race condition.
It seems like there are race conditions between the StreamPipe mechanism and HTTP/2 shutting down; on the HTTP/2 side, it might be as easy as turning the failing !this->IsDestroyed() check into an early return.
On the FileHandle side, it would be good to get a proper JS stack trace for the site of the assertion.
For a full-fledged example closer to a real-world application, visit https://github.com/budarin/http2-test-project
Socket.prototype._writeGeneric = function(writev, data, encoding, cb) { | |
// If we are still connecting, then buffer this for later. | |
// The Writable logic will buffer up any more writes while | |
// waiting for this one to be done. | |
if (this.connecting) { | |
this._pendingData = data; | |
this._pendingEncoding = encoding; | |
this.once('connect', function connect() { | |
this._writeGeneric(writev, data, encoding, cb); | |
}); |
"update" => recipes = update(args, path), | |
"install" => install(args, &recipes), |
'use strict'; | |
require('../common'); | |
process.stdin.emit('end'); |
'use strict'; | |
require('../common'); | |
process.domain = null; | |
setTimeout(function() { | |
console.log('this console.log statement should not make node crash'); | |
}, 1); |