# browserify-package-json

> Remove not public values from package.json on browserify

Latest version **1.0.1** (published 2016-11-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install browserify-package-json
pnpm add browserify-package-json
yarn add browserify-package-json
bun add browserify-package-json
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-11-03 |
| First published | 2016-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kirill Fomichev |
| Maintainers | fanatid |

## Links

- npm: https://www.npmjs.com/package/browserify-package-json
- Repository: https://github.com/fanatid/browserify-package-json
- Issues: https://github.com/fanatid/browserify-package-json/issues
- npm.io page: https://npm.io/package/browserify-package-json

## Recent versions

- 1.0.1 (latest) — 2016-11-03
- 1.0.0 — 2016-11-03

## README

# browserify-package-json

[![NPM Package](https://img.shields.io/npm/v/browserify-package-json.svg?style=flat-square)](https://www.npmjs.org/package/browserify-package-json)
[![Build Status](https://img.shields.io/travis/fanatid/browserify-package-json.svg?branch=master&style=flat-square)](https://travis-ci.org/fanatid/browserify-package-json)

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

## Description

Did you know that when [browserify][1] includes `package.json` file in bundle this bundle can contain private information like installed module path?

For example, lets install [browserify][1]:
```
$ pwd
/home/kirill/tmp
$ npm install browserify
...
$ cat ./node_modules/browserify/package.json  | grep _
  "_args": [
  "_from": "browserify@latest",
  "_id": "browserify@13.1.1",
  "_inCache": true,
  "_location": "/browserify",
  "_nodeVersion": "6.3.1",
  "_npmOperationalInternal": {
    "tmp": "tmp/browserify-13.1.1.tgz_1477162362598_0.2967709470540285"
  "_npmUser": {
  "_npmVersion": "3.10.5",
  "_phantomChildren": {},
  "_requested": {
  "_requiredBy": [
  "_resolved": "https://registry.npmjs.org/browserify/-/browserify-13.1.1.tgz",
  "_shasum": "72a2310e2f706ed87db929cf0ee73a5e195d9bb0",
  "_shrinkwrap": null,
  "_spec": "browserify",
  "_where": "/home/kirill/tmp",
    "string_decoder": "~0.10.0",
```

This package remove all values for which keys starts with `_`.

## How I can use this package?

There are two ways,

#### CLI

browserify -t [ browserify-package-json ] index.js

#### API

```js
const browserify = require('browserify')
const browserifyPackageJSON = require('browserify-package-json')

browserify()
  .add('index.js')
  .transform(browserifyPackageJSON)
  .bundle((err, result) => {
    if (!err) console.log(result.toString())
  })
```

## License

MIT

[1]: https://github.com/substack/node-browserify

---
_Source: https://npm.io/package/browserify-package-json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
