Socket
Socket
Sign inDemoInstall

neuron-pkg

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    neuron-pkg

Parses neuron package id into name, version and path.


Version published
Weekly downloads
3
decreased by-50%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

NPM version Build Status

neuron-pkg

Parses neuron package id into name, version and path.

Install

$ npm install neuron-pkg --save

Usage

var pkg = require('neuron-pkg');

pkg('a@~1.3.0/abc');
// -> {
//   name: 'a',
//   version: undefined
//   range: '~1.3.0',
//   path: '/abc'
// }

pkg('a@1.2.3');
// -> {
//   name: 'a',
//   version: '1.2.3',
//   range: undefined,
//   path: ''
// }

pkg(id)

  • id String

Returns Object the parsed object.

pkg.format(obj)

  • obj Object

The reverse method of pkg(id)

Returns String the formated id.

License

MIT

Keywords

FAQs

Last updated on 12 May 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc