How to use the jscrambler.default.config function in jscrambler

To help you get started, we’ve selected a few jscrambler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jscrambler / jscrambler / packages / ember-cli-jscrambler / jscrambler-plugin.js View on Github external
return new Promise((resolve, reject) =>
          jscrambler.downloadSourceMaps(
            Object.assign({}, jscrambler.config, {stream: false, protectionId}),
            (res, error) => {
              if (error) {
                console.error(error);
                return reject(error);
              }
              
              return this.processSourceMaps(res, this.outputPath, resolve);
            }
          ));
      }
github jscrambler / jscrambler / packages / jscrambler-webpack-plugin / src / index.js View on Github external
const results = this.protectionResult;

    for (const result of results) {
      compilation.assets[result.filename] = {
        source() {
          return result.content;
        },
        size() {
          return result.content.length;
        }
      };
    }

    if (sourceMaps) {
      client.downloadSourceMaps(
        Object.assign({}, client.config, {stream: false, protectionId}),
        res => this.processSourceMaps(res, compilation, callback)
      );

      return;
    }

    callback();
  }
}
github jscrambler / jscrambler / packages / jscrambler-webpack-plugin / src / index.js View on Github external
const client = require('jscrambler').default;
const {SourceMapSource} = require('webpack-sources');

const sourceMaps = !!client.config.sourceMaps;

class JscramblerPlugin {
  constructor(_options) {
    let options = _options;
    if (typeof options !== 'object' || Array.isArray(options)) options = {};

    this.options = Object.assign(options, {
      clientId: 2
    });

    this.processResult = this.processResult.bind(this);
    this.processSourceMaps = this.processSourceMaps.bind(this);
  }

  apply(compiler) {
    const enable =

jscrambler

Jscrambler API client.

MIT
Latest version published 2 months ago

Package Health Score

79 / 100
Full package analysis