# node-jose-browserify

> An advanced version of Cisco's node-jose module that works in both browser and the server.

Latest version **1.1.14** (published 2019-09-04) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install node-jose-browserify
pnpm add node-jose-browserify
yarn add node-jose-browserify
bun add node-jose-browserify
```

## 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.1.14 |
| Published | 2019-09-04 |
| First published | 2019-08-29 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 318.4 KB |
| Known vulnerabilities | 0 (+37 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Cisco Systems, Inc. |
| Maintainers | newtonjoshua |
| Keywords | node-jose, angular, web-app, browser, cisco, crypto, jose, jwa, jwe, jwk, jws |

## Links

- npm: https://www.npmjs.com/package/node-jose-browserify
- Repository: https://github.com/newtonjoshua/node-jose-browserify
- Homepage: https://github.com/newtonjoshua/node-jose-browserify#readme
- Issues: https://github.com/newtonjoshua/node-jose-browserify/issues
- npm.io page: https://npm.io/package/node-jose-browserify

## Dependencies (10)

- [long](https://npm.io/package/long.md) ^4.0.0
- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [buffer](https://npm.io/package/buffer.md) ^5.4.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [process](https://npm.io/package/process.md) ^0.11.10
- [base64url](https://npm.io/package/base64url.md) ^3.0.1
- [node-forge](https://npm.io/package/node-forge.md) ^0.8.1
- [es6-promise](https://npm.io/package/es6-promise.md) ^4.2.6
- [browserify-zlib](https://npm.io/package/browserify-zlib.md) ^0.2.0
- [stream-browserify](https://npm.io/package/stream-browserify.md) ^2.0.2

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.14 (latest) — 2019-09-04
- 1.1.13 — 2019-08-30
- 1.1.12 — 2019-08-30
- 1.1.11 — 2019-08-29
- 1.1.10 — 2019-08-29
- 1.1.9 — 2019-08-29
- 1.1.8 — 2019-08-29
- 1.1.7 — 2019-08-29
- 1.1.6 — 2019-08-29
- 1.1.5 — 2019-08-29
- 1.1.4 — 2019-08-29
- 1.1.3 — 2019-08-29

## README

[![published](https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg)](https://developer.cisco.com/codeexchange/github/repo/NewtonJoshua/node-jose-browserify)

# node-jose-browserify #

An advanced version of Cisco's node-jose module that works in both browser and the server. It is compatible with node.js and angular

Refer to https://github.com/cisco/node-jose for documentation.

### Install ###

```javascript
    npm i node-jose-browserify
```


## Angular Usage ##

Import and use as any other package. All the methods will be supported in the browser, just as in node.js.

```javascript
import * as jose from 'node-jose-browserify';
```

The following changes are required to make few node-modules available in the browser

- angular compilerOptions for stream

    In `tsconfig.json` , *compilerOptions* add
    ```json
    "paths": {
        "stream": ["../node_modules/stream-browserify/index.js"]
    }
    ```
    This is to avoid the below error
    > ERROR in ./node_modules/browserify-zlib/lib/index.js.
    > Module not found: Error: Can't resolve 'stream' in '***/node_modules/browserify-zlib/lib'
- polyfil for global object
    In `polyfills.ts` add 
    ```
    // Polyfill for node-jose
    (window as any)['global'] = window;
    ```
    This is to avoid the below error
    > Uncaught ReferenceError: global is not defined


### Merging node-jose updates

To pull the latest updates from node-jose into node-jose-browserify
```
$ git pull https://github.com/cisco/node-jose.git master
```

### PR ###

PR https://github.com/cisco/node-jose/pull/264 is raised to merge the changes with the node-jose repo

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