Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

libnpmaccess

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libnpmaccess

programmatic library for `npm access` commands

  • 1.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
555K
decreased by-66.79%
Maintainers
1
Weekly downloads
 
Created

What is libnpmaccess?

The libnpmaccess package is a Node.js library that provides programmatic access to the npm access control features. It allows you to manage package access permissions, such as granting or revoking access to npm packages for different users or teams.

What are libnpmaccess's main functionalities?

Grant Access

This feature allows you to grant access to a specific npm package for a user or team. In the code sample, 'read-write' access is granted to 'my-package' for the user 'username'.

const access = require('libnpmaccess');

async function grantAccess() {
  await access.grant('read-write', 'my-package', 'user:username');
  console.log('Access granted');
}

grantAccess();

Revoke Access

This feature allows you to revoke access to a specific npm package for a user or team. In the code sample, access to 'my-package' is revoked for the user 'username'.

const access = require('libnpmaccess');

async function revokeAccess() {
  await access.revoke('my-package', 'user:username');
  console.log('Access revoked');
}

revokeAccess();

List Access

This feature allows you to list the access permissions for a specific npm package. In the code sample, the access permissions for 'my-package' are listed.

const access = require('libnpmaccess');

async function listAccess() {
  const accessList = await access.lsPackages('my-package');
  console.log(accessList);
}

listAccess();

Other packages similar to libnpmaccess

FAQs

Package last updated on 20 Aug 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc