Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

package-json-versionify

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-versionify

Browserify transform to strip package.json of everything but the version

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

package-json-versionify Build Status

Browserify transform to strip everything from package.json except for the "version" field.

Installation

npm install --save package-json-versionify

Description

Say you want to ship a library, and do something like:

MyLibrary.version = require('./package.json').version;

Unfortunately, if you do this, then your entire package.json will be included in the output Browserify bundle, which will increase your bundle size. Bummer!

However, if you use this transform, then it will remove everything from package.json except for the "version" field. So when you require('./package.json'), you get something much more compact, e.g.:

{"version":"1.0.0"}

FAQs

Package last updated on 22 Dec 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

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