New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

npms-lib

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npms-lib

Typed API client for npms

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

npms-lib

NPM Codecov branch CircleCI CircleCI

Typed API client for npms

Contents

Installation

# NPM
npm install npms-lib

# Yarn
yarn add npms-lib

Example

import * as npms from 'npms-lib';

const result = await npms.search({ query: 'typescript', size: 1 });
console.log(result.results[0].package.name); // typescript

API Reference

  • search: Returns specified number of packages that match the specified parameters.

  • suggestions: Like search but with pre-set search parameters.

  • info: Returns information from one or more specified packages.

Use with Node.js

The library assumes it's running on a browser, so it relays on the fetch API. node-fetch is a good option:

import fetch from 'node-fetch';
import * as npms from 'npms-lib';

npms.config.fetch = fetch;

License

All the files in the repository are subject to the MIT license. Please refer to the License file at the root of the project to know more about it.

Keywords

typescript

FAQs

Package last updated on 22 Apr 2021

Did you know?

Socket

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.

Install

Related posts