Skip to content

Instantly share code, notes, and snippets.

View isaacs's full-sized avatar
๐Ÿ”ฎ
only way out is through

isaacs isaacs

๐Ÿ”ฎ
only way out is through
View GitHub Profile
foo\bar000644 000765 000024 00000000000 14102565404 013002 0ustar00isaacsstaff000000 000000
diff --git a/index.js b/index.js
index 56cbd66..b88f64b 100644
--- a/index.js
+++ b/index.js
@@ -8,6 +8,7 @@ const EOF = Symbol('EOF')
const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
const EMITTED_END = Symbol('emittedEnd')
const EMITTING_END = Symbol('emittingEnd')
+const EMITTED_ERROR = Symbol('emittedError')
const CLOSED = Symbol('closed')
diff --git a/index.js b/index.js
index 56cbd66..b88f64b 100644
--- a/index.js
+++ b/index.js
@@ -8,6 +8,7 @@ const EOF = Symbol('EOF')
const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
const EMITTED_END = Symbol('emittedEnd')
const EMITTING_END = Symbol('emittingEnd')
+const EMITTED_ERROR = Symbol('emittedError')
const CLOSED = Symbol('closed')
#!/usr/bin/env node
const re = /\/+$/
const batchStrings = [
new Array(Math.pow(2, 20) + 1).join('/'),
new Array(Math.pow(2, 18) + 1).join('/'),
new Array(Math.pow(2, 17) + 1).join('/'),
new Array(Math.pow(2, 16) + 1).join('/'),
new Array(Math.pow(2, 15) + 1).join('/'),
new Array(Math.pow(2, 14) + 1).join('/'),
$ tree
.
โ”œโ”€โ”€ .npmrc
โ”œโ”€โ”€ foo
โ”‚ โ”œโ”€โ”€ .npmrc
โ”‚ โ”œโ”€โ”€ a
โ”‚ โ”‚ โ””โ”€โ”€ b
โ”‚ โ”‚ โ””โ”€โ”€ c
โ”‚ โ”‚ โ””โ”€โ”€ d
โ”‚ โ”‚ โ””โ”€โ”€ e
'use strict'
const npa = require('npm-package-arg')
const semver = require('semver')
const { checkEngine } = require('npm-install-checks')
const engineOk = (manifest, npmVersion, nodeVersion) => {
try {
checkEngine(manifest, npmVersion, nodeVersion)
return true
#!/bin/bash
mkdir -p gh-274/folder1
touch gh-274/folder1/main.js
touch gh-274/index.js
tree gh-274/
node - <<JS
const tar = require('./')
tar.c({
const fs = require('fs')
const gfs = require('./')
const filename = 'foo'
console.log('starting')
// fill up the set of available file descriptors
const fds = []
while (true) {
try {
fds.push(fs.openSync(filename, 'w'))
const {promisify} = require('util')
const rpj = promisify(require('read-package-json'))
const rpjf = require('read-package-json-fast')
const pj = require.resolve('./package.json')
Promise.all([
rpj(pj),
rpjf(pj),
]).then(console.log)
#!/usr/bin/env node
const doFlush = process.argv.includes('flush')
const child = () => {
const N = 1e6
for (let i = 0; i < N; i++) {
const arr = [i,i,i,i,i,i,i,i,i,i]
const a = arr.toString() + ' ' + arr.length