Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
record-tuple-convert
Advanced tools
Easily convert deep Objects and Arrays to Records and Tuples.
As the record and tuple proposal is still in it's early stages, this package is not using a finalized API, so breaking changes might be frequent.
Since Babel still yet doesn't have a transform for Records and Tuples, you'll need to use @bloomberg/record-tuple-polyfill.
const convertToRecord = require('record-tuple-convert').convertToRecord;
const convertToTuple = require('record-tuple-convert').convertToTuple;
// Convert simple objects
convertToRecord({ foo: 'bar' }); // -> #{ foo: 'bar' }
// Convert deep objects
convertToRecord({
foo: {
bar: 'baz'
}
}); // #{ foo: #{ bar: 'baz' } }
// Convert simple arrays
convertToTuple(['foo', 'bar']); // -> #['foo', 'bar']
// Convert nth-dimensional arrays
convertToTuple(['foo', ['bar', ['baz']]]); // -> #['foo', #['bar', #['baz']]]
// Mix and match!
convertToRecord({ foo: ['bar'], baz: true }); // -> #{ foo: #['bar'], baz: true }
convertToTuple(['foo', { bar: 'baz' }]) // -> #['foo', #{ bar: 'baz' }]
This repo is open to issues and PRs, they are even encouraged!
To get setup, clone the repo, run npm install
and follow the instructions at @bloomberg/record-tuple-polyfill to install the polyfill.
To run the tests, run npm test
.
FAQs
Easily convert deep Objects and Arrays to Records and Tuples.
The npm package record-tuple-convert receives a total of 3 weekly downloads. As such, record-tuple-convert popularity was classified as not popular.
We found that record-tuple-convert 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
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
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.