Socket
Socket
Sign inDemoInstall

browserify-extract-ids

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-extract-ids

Browserify plugin to extract a bundle's module IDs to a file or callback.


Version published
Weekly downloads
1.7K
increased by8.97%
Maintainers
1
Weekly downloads
 
Created
Source

browserify-extract-ids

Browserify plugin to export a bundle's module IDs.

Installation

npm install browserify-extract-ids --save

Usage

// main.js
require('./a');
require('./b');
// a.js
require('c');
// b.js
console.log('do nothing!');
// c.js
console.log('do nothing!');
const extractIds = require('browserify-extract-ids');

browserify()
  .add('./main.js')
  .plugin(extractIds, {
    outputFile: './ids.json'
  });

This will result in a ids.json like the following. (Note: Browserify assigns modules numeric IDs.)

{
  '/some/filepath/a.js': 1,
  '/some/filepath/b.js': 2,
  '/some/filepath/c.js': 3,
  '/some/filepath/main.js': 4
}

Keywords

FAQs

Package last updated on 12 Apr 2017

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