
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
The fastest Function#bind
I could find.
Function#bind (native) x 709,955 ops/sec ±1.79% (84 runs sampled)
Function#bind (slice) x 2,610,293 ops/sec ±1.43% (99 runs sampled)
Function#bind (concat) x 2,622,574 ops/sec ±0.79% (101 runs sampled)
Function#bind (loop) x 2,952,311 ops/sec ±1.63% (95 runs sampled)
Fastest is Function#bind (loop)
4.16x as fast as Function#bind (native)
npm install fast-bind
Function.prototype.bind = require('fast-bind')
The previous version did not handle using the bound function as a constructor. This requires an instanceof check, and slows everything down a bunch.
Function#bind (native) x 803,410 ops/sec ±2.35% (79 runs sampled)
Function#bind (slice) x 4,771,960 ops/sec ±0.95% (99 runs sampled)
Function#bind (concat) x 3,838,614 ops/sec ±1.41% (95 runs sampled)
Function#bind (loop) x 6,440,278 ops/sec ±0.69% (97 runs sampled)
Fastest is Function#bind (loop)
8.02x as fast as Function#bind (native)
FAQs
the fastest version of Function#bind I could make
The npm package fast-bind receives a total of 76,262 weekly downloads. As such, fast-bind popularity was classified as popular.
We found that fast-bind demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.