🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

package-json-filterify

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

package-json-filterify

Browserify transform to filter package.json fields

1.0.4
latest
Source
npm
Version published
Weekly downloads
2
-75%
Maintainers
1
Weekly downloads
 
Created
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

browserify-transform

FAQs

Package last updated on 08 Sep 2016

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