Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
allocated-dynamic-typedarray
Advanced tools
Allocate an entire array, but automatically track which indices are occupied.
var ADTA = require('allocated-dynamic-typedarray');
var a = new ADTA(64); // maximum size is 64, defaults to Uint32Array
a.length(); // 0
a.push(72);
a.length(); // 1
a.get(0); // 72
a.push(23);
a.push(34);
a.push(56);
a.length() // 4
a.remove(1);
a.length(); // 3
a.toArray(); // [72,56,34]
Notice how the order of the items is not guaranteed after a .remove()
. This is to prevent needing to shift or push all values. If you need functionality otherwise, try a different module.
Pushing a value that would cause the array to exceed it's initial limit silently fails for now, as that's why TypedArrays do.
Since this is backed by a TypedArray, only values that could normally be stored in a TypedArray will succeed.
npm test
Pull requests are welcome!
MIT
FAQs
A typed array whose length() can change.
The npm package allocated-dynamic-typedarray receives a total of 0 weekly downloads. As such, allocated-dynamic-typedarray popularity was classified as not popular.
We found that allocated-dynamic-typedarray 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.