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.0 to 1.0.1

0

index.js

@@ -0,0 +0,0 @@ /*

2

package.json
{
"name": "amdextract",
"version": "1.0.0",
"version": "1.0.1",
"description": "Extracts AMD modules and their parts.",

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

@@ -1,3 +0,2 @@

# amdextract
[![Build Status](https://travis-ci.org/mehdishojaei/amdextract.png)](https://travis-ci.org/mehdishojaei/amdextract)
# amdextract [![Build Status](https://travis-ci.org/mehdishojaei/amdextract.png)](https://travis-ci.org/mehdishojaei/amdextract)

@@ -10,8 +9,8 @@ Extracts AMD modules, their parts and an optimized output without unused dependencies.

``` js
define("module1", ["view/a", "view/b"], function (a, b) {
var t = new a();
define('module1', ['p1', 'p2'], function (a, b) {
return a;
});
define("module2", ["view/a", "view/b", "view/c"], function (a, b, c) {
b.fetch();
define('module2', ['p1', 'p2', 'p3'], function (a, b, c) {
return b;
});

@@ -38,16 +37,16 @@ ```

coutput
output
``` console
2 modules detected.
Unused paths: view/b
Unused paths: view/a, view/c
Unused paths: p2
Unused paths: p1, p3
Optimized output:
define(["view/a"], function (a) {
var t = new a();
define('module1', ['p1'], function (a) {
return a;
});
define(["view/b"], function (b) {
var t = b;
define('module2', ['p2'], function (b) {
return b;
});

@@ -80,9 +79,17 @@ ```

example
``` js
/* exceptsPaths: view/c */
define(["view/a", "view/b", "view/c"], function (a, b, c) {
b.fetch();
/* exceptsPaths: p3 */
define(['p1', 'p2', 'p3'], function (a, b, c) {
return b;
});
```
output
```
/* exceptsPaths: p3 */
define(['p2', 'p3'], function (b, c) {
return b;
});
```
#### removeUnusedDependencies

@@ -119,8 +126,2 @@ Type: Boolean

## Release History
* 2014-03-16   v1.0.0   First release.
* 2014-03-16   v0.1.6   Fix a bug related to unused paths.
* 2014-03-15   v0.1.5   Add the ability to parse empty modules.
* 2014-03-06   v0.1.3   Detects paths without corresponding dependency as unused.
* 2014-03-06   v0.1.2   Dependency quotes in `optimizedContent` will be same as the original source.
* 2014-01-20   v0.1.1   `exceptsPaths` can also be defined before each module definition.
* 2014-01-13   v0.1.0   Works on files with multiple modules. Can detect module id if provided. Can remove unused dependencies. Add the new `exceptsPaths` option. Options `excepts` and `exceptsPaths` can take RegExps.
* 2014-03-17   v1.0.0   First release.

@@ -0,0 +0,0 @@ // General test for all cases.

@@ -0,0 +0,0 @@ // General test for all cases.

@@ -0,0 +0,0 @@ var amdextract = require('..');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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