babel-plugin-provide-modules
Advanced tools
Comparing version 1.0.2 to 1.0.3
'use strict'; | ||
var _compact = require('lodash/compact'); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _compact2 = _interopRequireDefault(_compact); | ||
var _compact2 = require('lodash/compact'); | ||
var _forEachRight = require('lodash/forEachRight'); | ||
var _compact3 = _interopRequireDefault(_compact2); | ||
var _forEachRight2 = _interopRequireDefault(_forEachRight); | ||
var _values2 = require('lodash/values'); | ||
var _isEmpty = require('lodash/isEmpty'); | ||
var _values3 = _interopRequireDefault(_values2); | ||
var _isEmpty2 = _interopRequireDefault(_isEmpty); | ||
var _keys2 = require('lodash/keys'); | ||
var _keys = require('lodash/keys'); | ||
var _keys3 = _interopRequireDefault(_keys2); | ||
var _keys2 = _interopRequireDefault(_keys); | ||
var _map2 = require('lodash/map'); | ||
var _values = require('lodash/values'); | ||
var _map3 = _interopRequireDefault(_map2); | ||
var _values2 = _interopRequireDefault(_values); | ||
var _reverse2 = require('lodash/reverse'); | ||
var _isObject = require('lodash/isObject'); | ||
var _reverse3 = _interopRequireDefault(_reverse2); | ||
var _isObject2 = _interopRequireDefault(_isObject); | ||
var _isArray2 = require('lodash/isArray'); | ||
var _map = require('lodash/map'); | ||
var _isArray3 = _interopRequireDefault(_isArray2); | ||
var _map2 = _interopRequireDefault(_map); | ||
var _isObject2 = require('lodash/isObject'); | ||
var _isArray = require('lodash/isArray'); | ||
var _isObject3 = _interopRequireDefault(_isObject2); | ||
var _isArray2 = _interopRequireDefault(_isArray); | ||
var _isEmpty2 = require('lodash/isEmpty'); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _isEmpty3 = _interopRequireDefault(_isEmpty2); | ||
var _forEachRight2 = require('lodash/forEachRight'); | ||
var _forEachRight3 = _interopRequireDefault(_forEachRight2); | ||
exports.default = function (_ref) { | ||
@@ -54,7 +58,7 @@ var t = _ref.types; | ||
switch (true) { | ||
case (0, _isArray2.default)(bindings): | ||
return (0, _map2.default)(bindings, function (binding) { | ||
return destructuredImport.apply(undefined, _toConsumableArray((0, _isObject2.default)(binding) ? [(0, _values2.default)(binding)[0], (0, _keys2.default)(binding)[0], scope] : [binding, binding, scope])); | ||
case (0, _isArray3.default)(bindings): | ||
return (0, _map3.default)(bindings, function (binding) { | ||
return destructuredImport.apply(undefined, _toConsumableArray((0, _isObject3.default)(binding) ? [(0, _values3.default)(binding)[0], (0, _keys3.default)(binding)[0], scope] : [binding, binding, scope])); | ||
}); | ||
case (0, _isObject2.default)(bindings): | ||
case (0, _isObject3.default)(bindings): | ||
return [].concat(_toConsumableArray(makeSpecifiers(bindings.default, scope)), _toConsumableArray(makeSpecifiers(bindings.destructured, scope))); | ||
@@ -74,5 +78,5 @@ default: | ||
if ((0, _isEmpty2.default)(opts)) return; | ||
(0, _forEachRight2.default)(opts, function (bindings, module) { | ||
var specifiers = (0, _compact2.default)(makeSpecifiers(bindings, scope)); | ||
if ((0, _isEmpty3.default)(opts)) return; | ||
(0, _forEachRight3.default)(opts, function (bindings, module) { | ||
var specifiers = (0, _compact3.default)(makeSpecifiers(bindings, scope)); | ||
if (specifiers.length) addImport(node, specifiers, module); | ||
@@ -79,0 +83,0 @@ }); |
{ | ||
"name": "babel-plugin-provide-modules", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "lib/index.js", | ||
@@ -14,3 +14,3 @@ "repository": { | ||
"engines": { | ||
"node": "4.1.x" | ||
"node": ">=4.x" | ||
}, | ||
@@ -17,0 +17,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7715
142