
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@putout/plugin-declare
Advanced tools
🐊Putout plugin adds ability to declare variable that was not defined before, including:
isFn
, isString
, isNumber
, isObject
, isBool
, isUndefined
, isSymbol
and isNull
;maybeArray
, maybeFn
, maybeEmptyArray
;not
,id
, returns
;freshImport
, freshImportDefault
;fixtures
: readFixture(name)
;Object
;npm i putout @putout/plugin-declare -D
Add .putout.json
with:
{
"plugins": {
"declare": "on"
}
}
Use options:
dismiss
for variables you don't want to declare;declarations
to declare variables;{
"rules": {
"declare": ["on", {
"declarations": {
"hello": "import {hello} from 'world'"
},
"dismiss": [
"assert",
"entries",
"parse",
"stringify",
"defineProperty",
"isArray",
"noop",
"join",
"keys",
"values",
"stopAll",
"once",
"putout",
"simport"
]
}]
}
}
assign
const hello = 'world';
const object = {};
assign(object, {
hello,
});
const hello = 'world';
const object = {};
const {assign} = Object;
assign(object, {
hello,
});
keys
const hello = 'world';
const object = {};
const allKeys = keys(object);
const hello = 'world';
const object = {};
const {keys} = Object;
const allKeys = keys(object);
values
const object = {};
const allValues = values(object);
const {values} = Object;
const object = {};
const allValues = values(object);
isArray
isArray(array);
const {isArray} = Array;
isArray(array);
noop
noop();
const noop = () => {};
noop();
if (isFn(fn))
fn();
const isFn = (a) => typeof a === 'function';
if (isFn(fn))
fn();
const a = [
...maybeArray(b),
];
const {isArray} = Array;
const maybeArray = (a) => isArray(a) ? a : [a];
const a = [
...maybeArray(b),
];
MIT
FAQs
🐊Putout plugin adds ability to declare variables
The npm package @putout/plugin-declare receives a total of 3,902 weekly downloads. As such, @putout/plugin-declare popularity was classified as popular.
We found that @putout/plugin-declare demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.