Socket
Socket
Sign inDemoInstall

extension-jse

Package Overview
Dependencies
2
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    extension-jse

JavaScript Encrypt Extensions


Version published
Maintainers
1
Install size
67.5 kB
Created

Readme

Source

Extension-JSE

JavaScript Encrypt Extensions. Protect your code in the process of copying.

install

npm i extension-jse

# or install globally
npm i -g extension-jse

Usage

cli

$ export JSE_KEY=<secret-key>
$ jse <src/code.js> [output/]

in code

Pack your code

const jse = require('extension-jse');

// in memory
let originCode = 'your-code';
jse.pack(originCode);

// package from file
let jsePackage = jse.packFromFile(__dirname +'path/to/code.js');

// write to file
jse.writeToFile(__dirname + '/jse/code.jse', jsePackage);

Use jse

// enable 'require' to support 'jse' extension
require('extension-jse').enableExtension();

// use .jse like regular modules, the '.jse' is not necessary.
var code = require("./jse/code[.jse]");
$ export JSE_KEY=<secret-key>
$ node your-porject.js

npm script

"scripts": {
    "build": "jse  <src/code.js> [output/]",
}
$ export JSE_KEY=<secret-key>
$ npm run build

FAQs

Last updated on 02 Apr 2017

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