Installations
npm install babel-plugin-transform-es2015-modules-simple-desctructure-amd
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
6.9.0
NPM Version
3.10.8
Score
64.4
Supply Chain
91.7
Quality
72.7
Maintenance
25
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
th3dark0n3
Download Statistics
Total Downloads
36,619
Last Day
9
Last Week
39
Last Month
309
Last Year
13,578
GitHub Statistics
3 Stars
25 Commits
1 Forks
2 Watching
1 Branches
1 Contributors
Bundle Size
369.24 kB
Minified
96.65 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.1.0
Package Id
babel-plugin-transform-es2015-modules-simple-desctructure-amd@0.1.0
Size
3.87 kB
NPM Version
3.10.8
Node Version
6.9.0
Total Downloads
Cumulative downloads
Total Downloads
36,619
Last day
12.5%
9
Compared to previous day
Last week
-48.7%
39
Compared to previous week
Last month
-61.2%
309
Compared to previous month
Last year
4.7%
13,578
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
babel-plugin-transform-es2015-modules-simple-destructure-amd
Limited transformer for ECMAScript 2015 modules (AMD)
Converts this code:
1import x from '/path/to/x'; 2import y from '/path/to/y'; 3import React, { Component } from 'react'; 4doSomething(); 5export default x + y;
Into this one:
1define(['/path/to/x', '/path/to/y', 'react'], function (x, y, React) { 2 var Component = React.Component; 3 doSomething(); 4 return x + y; 5});
Instead of this one (generated with babel-plugin-transform-es2015-modules-amd
):
1define(['exports', '/path/to/x', '/path/to/y', 'react'], function (exports, _x, _y, _react) { 2 Object.defineProperty(exports, "__esModule", { 3 value: true 4 }); 5 6 var _x2 = _interopRequireDefault(_x); 7 8 var _y2 = _interopRequireDefault(_y); 9 10 var _react2 = _interopRequireDefault(_react); 11 12 var _component2 = _react2.default.Component; 13 14 function _interopRequireDefault(obj) { 15 return obj && obj.__esModule ? obj : { 16 'default': obj 17 }; 18 } 19 20 doSomething(); 21 exports.default = _x2.default + _y2.default; 22});
Supported features:
import SPECIFIER from 'PATH'
import 'PATH'
import {SPECIFIER1, SPECIFIER2 as SPECIFIER3} from 'PATH'
import SPECIFIER1, {SPECIFIER2, SPECIFIER3 as SPECIFIER4} from 'PATH'
export default NODE
Other features aren't supported.
Warning. If no import
or export
are presented in JavaScript file, the plugin does nothing (means it doesn't wrap code with define
).
Installation
1$ npm install --save-dev babel-plugin-transform-es2015-modules-simple-destructure-amd
Usage
Via .babelrc
(Recommended)
.babelrc
1{ 2 "plugins": ["transform-es2015-modules-simple-destructure-amd"] 3}
Via Node API
1require('babel').transform('code', { 2 plugins: ['transform-es2015-modules-simple-destructure-amd'] 3});
Thanks to finom.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 0/25 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More