Socket
Socket
Sign inDemoInstall

amdextract

Package Overview
Dependencies
0
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

2

index.js

@@ -81,3 +81,3 @@ /*

unusedPaths = [],
exceptsPaths = [],
exceptsPaths = options.exceptsPaths,
excepts = options.excepts,

@@ -84,0 +84,0 @@ body, // Module body with comments

{
"name": "amdextract",
"version": "1.0.2",
"version": "1.0.3",
"description": "Extracts AMD modules and their parts.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -123,2 +123,3 @@ # amdextract [![Build Status](https://travis-ci.org/mehdishojaei/amdextract.png)](https://travis-ci.org/mehdishojaei/amdextract)

## Release History
* 2014-03-29   v1.0.3   Fix a bug when specifying exceptsPaths in options only.
* 2014-03-17   v1.0.0   First release.

@@ -110,2 +110,18 @@ var amdextract = require('..');

describe('when specifying exceptsPaths in options only', function() {
var output = amdextract.parse(
"define('name', ['p1', 'p2'], function(a) { return a; })",
{ removeUnusedDependencies: true, exceptsPaths: ['p2'] }
);
var result = output.results[0];
it('.moduleId', function() { should(result.moduleId).equal('name'); });
it('.paths', function() { result.paths.should.be.eql(['p1', 'p2']); });
it('.dependencies', function() { result.dependencies.should.be.eql(['a']); });
it('.unusedPaths', function() { result.unusedPaths.should.be.eql([]); });
it('.unusedDependencies', function() { result.unusedDependencies.should.be.eql([]); });
it('.optimizedContent', function() { should(output.optimizedContent).be.equal(
"define('name', ['p1', 'p2'], function(a) { return a; })"
); });
});
describe('general test', function() {

@@ -112,0 +128,0 @@ var output = parse('sample', { removeUnusedDependencies: true, exceptsPaths: ['t5', /^m/] });

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