Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
lodash-ny-util
Advanced tools
Lodash mixin for generic list, map, string functionality.
npm install --save lodash-ny-util
_.mixin(require('lodash-ny-util'));
Maps the first row to become the property names of every following row, returning a list of maps.
_.mapToHeaders([['a', 'b'], ['c', 'd'], ['e', 'f']]);
//becomes [{a: 'c', b: 'd'}, {a: 'e', b: 'f'}]
Shorthand for using lodash functions with A+ Promise's .then
function
return Promise.resolve(thing).then(_.promise(_.indexBy)('name')))
return Promise.resolve(thing).then(_.promise('indexBy')('name')))
return Promise.resolve(thing).then(_.promise(_.indexBy, 'name')))
return Promise.resolve(thing).then(_.promise('indexBy', 'name')))
Takes an object that contains other objects, and flips the keys of the object and the inner object.
_.invertKeys({a: {b: 'c', d: 'e'}, f: {g: 'h', i: 'j'}})
//becomes {b: {a: 'c'}, d: {a: 'e'}, g: {f: 'h'}, i: {f: 'j'}}
Takes an object, and returns every object inside that object.
_.listDeepObjects({a:{b:{c:{d:'e'}}, f:{g:{h:'e'}}}})
// becomes:
// [
// { b: { c: { d: 'e' } }, f: { g: { h: 'e' } } },
// { c: { d: 'e' } },
// { g: { h: 'e' } },
// { h: 'e' },
// { d: 'e' },
// ]
Optionally takes a filter:
_.listDeepObjects({a:{b:{c:{d:'e'}}, f:{d:{g:'e'}}}}, 'd');
//becomes [ { d: { g: 'e' } }, { d: 'e' } ]
_.listDeepObjects({a: {type:'yarn'}, b: {c: {type:'sweater'}}}, function (obj) { return !!obj.type; });
//becomes [ { type: 'yarn' }, { type: 'sweater' } ]
FAQs
Lodash mixin for generic list, map, string functionality.
We found that lodash-ny-util demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.