Socket
Socket
Sign inDemoInstall

package-json-filterify

Package Overview
Dependencies
5
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    package-json-filterify

Browserify transform to filter package.json fields


Version published
Weekly downloads
24
increased by100%
Maintainers
1
Install size
1.38 MB
Created
Weekly downloads
 

Readme

Source

package-json-filterify

Browserify transform to filter package.json when it is required, so as to not include all of it in the final bundle.

By default, keeps "name" and "version" fields, but this can be configured.

npm install --save-dev package-json-filterify
var packageJson = require('./package.json');
console.log(packageJson.name, packageJson.version);

Usage

Command line

browserify -t package-json-filterify input.js > output.js

browserify field

{
  "browserify": {
    "transform": [
      "package-json-filterify"
    ]
  }
}

Configuration

Configure what fields to keep:

package.json

{
    "package-json-filterify": {"keep": ["name", "version", "main"]}
}

browserify field

{
  "browserify": {
    "transform": [
      ["package-json-filterify", {"keep": ["name", "version", "main"]}]
    ]
  }
}

See also

  • package-json-versionify

Keywords

FAQs

Last updated on 08 Sep 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