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.
A package to figure out if one is stupid.
Install using npm
:
npm i is-stupid
Install using yarn
:
yarn install is-stupid
With Deno
:
import isStupid from 'https://unpkg.com/is-stupid/dist/index.js'
This package uses both default exports and named exports, as such, it requires ES modules to be used.
For modern environments with ES module support (such as typescript
, or usage with bundlers):
import isStupid from 'is-stupid';
if (isStupid) {
console.log('oh no');
}
In CommonJS environments (such as Node), you may use esm
to import it:
const isStupid = require('esm')(module)('is-stupid');
boolean
A pre-calculated value for performance reasons.
import isStupid from 'is-stupid';
isStupid;
() => boolean
Do calculation during runtime for maximum accuracy.
import { recalculate } from 'is-stupid';
recalculate();
() => StupidItem
Use heuristics, as well as additional utility functions. Can be slower than above functions.
import { smartRecalculate } from 'is-stupid';
smartRecalculate();
class extends Boolean
An item wrapping around Boolean
to provide further functionality.
boolean
A variable indicating how sure the item is.
StupidItem.IS_SURE
() => boolean
Attempt to persuade the item.
smartRecalculate()
.isSureAboutBeingSure()
() => Promise<boolean>
Asynchronously give time for the item to think about it.
await smartRecalculate()
.takeSomeTimeToRethinkIsSure()
() => boolean
Synchronously give time for the item to think about it.
await smartRecalculate()
.takeSomeTimeToRethinkIsSureSync()
() => boolean
Converts the item to a primitive.
stupidItem[Symbol.toPrimitive]()
Install dev-dependencies, then test:
$ npm i -D && npm t
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jason Lim
Copyright © 2021 Jason Lim. Released under the WTFPL license.
FAQs
Roses are red, you are stupid
We found that is-stupid 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.