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
// Do this | |
const { writable, readable } = new TransformStream(); | |
const writer = writable.getWriter(); | |
writer.write('something'); | |
writer.write('something'); | |
writer.write('something'); | |
// Here, you can use the writer's `.ready` promise to determine |
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
* it was a mistake to let npm, inc. get as far as it did with what should have always been a part of the foundation (post Joyent). | |
* The CLI isn't the interesting part – the registry contains the value & needs to be safeguarded. | |
* I really strongly dislike Facebook and don't trust anyone that takes a paycheck or benefits at all from that brand. NPM is know to not be well managed but I really don't like Facebook. | |
* "Dear God please don't ship Yarn by default. Not only are the maintainers unpleasant to interact with, the whole thing is just... bad. | |
* Most of the time fixing Yarn issues comes down to: ""Can you try npm instead?"". Making that a default experience would be a catastrophy." | |
* I am more concerned about the stability of the npm package management repo than necessarily npm vs yarn. | |
* I remember when node didn't come with a package manager, it was pretty bad | |
* the problem is not the package manager, it’s the registry. Currently the registry is not owned the foundation. no matter what the client is, we |
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
There once was a repo written in C | |
The name of the repo was libshanty | |
The buffers overran, her memory leaked | |
O blow, my registers, blow. | |
Soon may the User folk come | |
And try our repo to build and run | |
One day, when the compilin's done | |
We'll make a release and go | |
She had not been two weeks released | |
When down on the net came a CVE |
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
'use strict'; | |
const { | |
createHistogram, | |
performance: { | |
timerify | |
} | |
} = require('perf_hooks'); | |
const users = [ |
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
import * as foo from 'http://localhost:3001/foo.ts' |
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
Histogram { | |
min: 200, | |
max: 842751, | |
mean: 326.24267848, | |
exceeds: 0, | |
stddev: 512.5949230856029, | |
percentiles: SafeMap(30) [Map] { | |
0 => 200, | |
50 => 301, | |
75 => 401, |
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 EventEmitter = require('events') | |
const { promisify } = require('util') | |
const foo = new EventEmitter() | |
const sleep = promisify(setTimeout) | |
foo.on('something', async () => { | |
await sleep(100) | |
try { | |
functionThatDoesNotExist() |
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