Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
all-package-names
Advanced tools
Get all NPM package names.
Includes a JSON file of all NPM package names at the time of last publish, but also allows for syncing with latest packages.
yarn add all-package-names
npm install all-package-names
import { load, sync } from "all-package-names";
// Load from an existing sync (included on install)
load().then(({ packageNames }) => {
console.log(packageNames); // array of all package names on npm
});
// Sync and return new package names
sync().then(({ packageNames }) => {
console.log(packageNames); // array of all package names on npm
});
// Load with a maxAge of 1 minute
load({ maxAge: 60000 }).then(({ packageNames }) => {
console.log(packageNames); // array of all package names on npm
});
// Sync with a maxAge of 1 minute
sync({ maxAge: 60000 }).then(({ packageNames }) => {
console.log(packageNames); // array of all package names on npm
});
import { load, sync, LoadOptions, SyncOptions, Save, State, StateHook } from "all-package-names";
function load({ maxAge }: LoadOptions): Promise<Save>
function sync({ maxAge }: LoadOptions = {}) => Promise<Save>;
type LoadOptions = {
/**
* Maximum milliseconds after a sync to avoid re-syncing
*/
maxAge?: number;
};
type Save = {
/**
* Index of last package synced
*/
since: number;
/**
* Timestamp of last sync
*/
timestamp: number;
/**
* Array of package names
*/
packageNames: string[];
};
import { sync, LoadOptions, SyncOptions, Save, State, StateHook } from "all-package-names";
function sync({ onData, onStart, onEnd, maxAge }: SyncOptions = {}) => Promise<Save>;
type SyncOptions = {
onStart?: StateHook;
onData?: StateHook;
onEnd?: StateHook;
} & LoadOptions;
type StateHook = (state: State) => void;
type State = {
/**
* Starting package sync index
*/
start: number;
/**
* Current package sync index
*/
index: number;
/**
* Ending package sync index
*/
end: number;
/**
* Percentage of sync completed
*/
progress: number;
/**
* Milliseconds since sync began
*/
elapsed: number;
/**
* Set of package names that have been added
*/
packageNames: Set<string>;
};
Usage: all-package-names [options] [command]
Options:
-v --version output the version number
-h, --help display help for command
Commands:
sync [options] Sync latest packages from NPM
help [command] display help for command
Sync latest packages from NPM.
Usage: all-package-names sync [options]
Sync latest packages from NPM
Options:
-m --max-age [milliseconds] Maximum milliseconds after a sync to avoid re-syncing
-h, --help display help for command
Add all-package-names commands to any commander program:
import { program } from "commander";
import { syncCommand } from "all-package-names";
syncCommand(program);
FAQs
Get all NPM package names
The npm package all-package-names receives a total of 14,293 weekly downloads. As such, all-package-names popularity was classified as popular.
We found that all-package-names 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.