%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
// Function to determine whether a path is in the package.bin set. // Used to prevent issues when people publish a package from a // windows machine, and then install with --no-bin-links. // // Note: this is not possible in remote or file fetchers, since // we don't have the manifest until AFTER we've unpacked. But the // main use case is registry fetching with git a distant second, // so that's an acceptable edge case to not handle. const binObj = (name, bin) => typeof bin === 'string' ? { [name]: bin } : bin const hasBin = (pkg, path) => { const bin = binObj(pkg.name, pkg.bin) const p = path.replace(/^[^\\/]*\//, '') for (const kv of Object.entries(bin)) { if (kv[1] === p) { return true } } return false } module.exports = (pkg, path) => pkg && pkg.bin ? hasBin(pkg, path) : false