JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6324
  • Score
    100M100P100Q130553F
  • License MIT

Node.js SDK to fetch data from the npm API.

Package Exports

  • @nodesecure/npm-registry-sdk

Readme

npm-registry-sdk

version Maintenance Security Responsible Disclosure mit dep

Node.js SDK to fetch data from the npm API.

Getting Started

This package is available in the Node Package Repository and can be easily installed with npm or yarn.

$ npm i @nodesecure/npm-registry-sdk
# or
$ yarn add @nodesecure/npm-registry-sdk

Usage example

import Registry from "@nodesecure/npm-registry-sdk";

API

getNpmRegistryURL(): string

getLocalRegistryURL(): string

setLocalRegistryURL(value: string | URL): string

loadRegistryURLFromLocalSystem(): string

metadata(): Promise<NpmRegistryMetadata>

interface NpmRegistryMetadata {
  db_name: string;
  doc_count: number;
  doc_del_count: number;
  update_seq: number;
  purge_seq: number;
  compact_running: boolean;
  disk_size: number;
  data_size: number;
  instance_start_time: string;
  disk_format_version: number;
  committed_update_seq: number;
}

packument(name: string, options?: PackumentOptions): Promise<npm.Packument>

interface PackumentOptions {
  token: string;
}

packumentVersion(name: string, version: string, options?: packumentOptions): Promise<npm.PackumentVersion>

Contributors ✨

All Contributors

Thanks goes to these wonderful people (emoji key):


Gentilhomme

💻 📖 👀 🛡️ 🐛

Quentin Lepateley

💻 📖 👀

Nicolas Hallaert

📖

tekeuange23

💻

License

MIT