Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
assertions with javascript comparison operators
• Why • Example • Features • License •
This originated as an attempt to have assertions that are less verbose because assert.notDeepStrictEqual
and the likes are ugly.
import t from 'assert-op'
t('mytest', a => {
a('==', 2, 2)
a`==`(2, 2, 'this alternate form is also possible')
a`!==`(3, 4, 'should be unequal')
a`<`(1, 2)
a`!`(null, 'should be falsy')
a`!{===}`([], 'str', 'should be notDeepStrictEqual')
a('{==}', [2], 2, 'should be deepEqual')
a('!==', 3, 4)
a('{===}', new Set([1,2]), new Set([1,2]))
a('{===}', new Map([[1,2]]), new Map([[1,2]]))
})
==
, !==
, ===
, !===
, <
, <=
, >
, >=
)!
, !!
){==}
: deepEqual!{==}
: notDeepEqual{===}
: strictDeepEqual!{===}
: notStrictDeepEqualthrows
and !throws
for assert.throwsSet
and Map
FAQs
assertions using comparison operators
We found that assert-op 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.