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.
@jsep-plugin/ternary
Advanced tools
A JSEP plugin for adding ternary expression support. Allows expressions of the form:
jsep('a ? 1 : 2');
npm install @jsep-plugin/ternary
# or
yarn add @jsep-plugin/ternary
import jsep from 'jsep';
import jsepTernary from '@jsep-plugin/ternary';
jsep.plugins.register(jsepTernary);
1.0.0 - 2021-08-22
Rewrote to ESM, added a plugin system, and fixed numerous grammar issues. For most standard use-cases, this release should not be a breaking change, as every effort was made to maintain compatibility.
build
folder to dist
(#130). The package file structure is now:├── CHANGELOG.md
├── LICENSE
├── README.md
├── package.json
├── dist
│ ├── jsep.js
│ ├── jsep.min.js
│ ├── cjs
│ │ ├── jsep.cjs.js
│ │ ├── jsep.cjs.min.js
│ ├── iife
│ │ ├── jsep.iife.js
│ │ ├── jsep.iife.min.js
LogicalExpression
and treat it as a BinaryExpression
(#100)missing unaryOp argument
unexpected "?"
.
now throws unexpected .
()()
now throws unexpected "("
a.this
, a.true
, a.false
, a.null
now match esprima and treat the property as an identifier instead of a literal or ThisExpression() => ...
)a = 2
, a++
)await a.find(async (v1, v2) => await v1(v2))
)/* .. */
and // ...
)new Date()
){a: 1, b}
)/123/ig
)fn(...a)
, [1, ...b]
, {...c}
)`hi ${name}`
, msg`hig ${name}`
)(1, 2)
now returns a SequenceExpression instead of throwing an Unclosed (
errorFAQs
Adds ternary expression support
The npm package @jsep-plugin/ternary receives a total of 319,898 weekly downloads. As such, @jsep-plugin/ternary popularity was classified as popular.
We found that @jsep-plugin/ternary demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
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.