Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Changelog
4.0.1 (2024-02-07)
Readme
Node.js REPL with lodash
Sometimes we use the Node.js REPL interface to experiment with code. Wouldn’t it be great to have that interface with lodash required by default?
$ npm install -g n_
$ n_
n_ >
lodash is now attached to the REPL context as _
, so just use it:
n_ > _.compact([0, 1, false, 2, '', 3]);
[ 1, 2, 3 ]
n_ >
Use lodash's functional programming variant lodash/fp
:
$ n_ --fp
n_ > _.map(function(v) { return v * 2; }, [1, 2, 3]);
[ 2, 4, 6 ]
n_ >
Enable strict mode:
$ n_ --use_strict
n_ >
Commands which facilitate changing the lodash flavor can be executed with the .lodash
repl command:
.lodash fp
: switch to lodash/fp.lodash vanilla
: switch to vanilla lodash mode.lodash reset
: switch to initial lodash mode.lodash swap
: switch to the other lodash mode (vanilla/fp).lodash current
: output current lodash flavor in use.lodash version
: output lodash version in useUse .lodash help
to view the available repl commands within the repl.
__
as last evaluated expressionThe special character _
refers to the lodash instance, and cannot hold the value of the last expression.
Use __
to access the last expression instead:
n_ > 10 + 2
12
n_ > 'number ' + __
'number 12'
Aside from --fp
and --use_strict
/--use-strict
, other options are available either as CLI flags or via environment variables (with a trailing _N_
).
Available cli options can be viewed with:
n_ --help
Enjoy! :rocket:
FAQs
lodash REPL
The npm package n_ receives a total of 128 weekly downloads. As such, n_ popularity was classified as not popular.
We found that n_ demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.