Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

license-data-follower

1.0.3 • Public • Published

Transform Stream

The package exports a transform stream constructor that reads npm public registry change objects and writes objects like:

{
  sequence: Number,
  name: String,
  version: String,
  hasLicense: Boolean,
  license: Any
}

You probably want something like:

var ChangesStream = require('changes-stream')
var LicenseDataFollower = require('license-data-follower')
 
new ChangesStream({
  db: 'https://replicate.npmjs.com',
  include_docs: true
})
.pipe(new LicenseDataFollower())
.on('data', function (data) {
  // ...
})

HTTP Server

The package installs a license-data-follower bin script that follows the npm public registry and serves JSON objects for requests like

GET /package/{name}/{version}

and

GET /package/{name}/{version}/{sequence}

The server emits pino log messages to standard streams and stores data with level.

Keywords

none

Install

npm i license-data-follower

DownloadsWeekly Downloads

3

Version

1.0.3

License

MIT

Last publish

Collaborators

  • avatar