1.0.4 • Published 3 years ago

obfuscator-middleware v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Obfuscator Middleware NPM Version node JavaScript Style Guide

The way this middleware works is it's an express middleware for serving minified obfuscated Javascript files. You can serve it at a certain path and method.

Methods

The object obtained from requiring is the init function which will return the middleware.

  • obf(options) (this will return a middleware of req, res, next)
  • options: {store, location, param}

The default options are options: {require('store'), './', 'fileName'}

The param option refers to what parameter we are looking for i.e :fileName is the correct way to work with the default options.

Example

const obf = require("./obfuscator");
app.get('/scripts/:fileName.js', obf({location: './assets/scripts/'}));

In this example, anything requesting GET from /scripts/*.js will be found from ./assets/scripts/ and served obfuscated.

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago