Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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
The npm package assert-op receives a total of 13 weekly downloads. As such, assert-op popularity was classified as not popular.
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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.