Socket
Socket
Sign inDemoInstall

babel-plugin-check-es2015-constants

Package Overview
Dependencies
Maintainers
6
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-check-es2015-constants - npm Package Compare versions

Comparing version 6.7.2 to 6.8.0

41

lib/index.js

@@ -1,21 +0,37 @@

"use strict";
/*istanbul ignore next*/"use strict";
exports.__esModule = true;
exports["default"] = function (_ref) {
var messages = _ref.messages;
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
exports.default = function ( /*istanbul ignore next*/_ref) {
/*istanbul ignore next*/var messages = _ref.messages;
return {
visitor: {
visitor: { /*istanbul ignore next*/
Scope: function Scope(_ref2) {
var scope = _ref2.scope;
/*istanbul ignore next*/var scope = _ref2.scope;
for (var _name in scope.bindings) {
var binding = scope.bindings[_name];
for (var name in scope.bindings) {
var binding = scope.bindings[name];
if (binding.kind !== "const" && binding.kind !== "module") continue;
var _arr = binding.constantViolations;
for (var _i = 0; _i < _arr.length; _i++) {
var violation = _arr[_i];
throw violation.buildCodeFrameError(messages.get("readOnly", _name));
for ( /*istanbul ignore next*/var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
/*istanbul ignore next*/
var _ref3;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref3 = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref3 = _i.value;
}
var violation = _ref3;
throw violation.buildCodeFrameError(messages.get("readOnly", name));
}

@@ -28,2 +44,5 @@ }

/*istanbul ignore next*/
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = exports["default"];
{
"name": "babel-plugin-check-es2015-constants",
"version": "6.7.2",
"version": "6.8.0",
"description": "Compile ES2015 constants to ES5",

@@ -12,7 +12,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-check-es2015-constants",

"dependencies": {
"babel-runtime": "^5.0.0"
"babel-runtime": "^6.0.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "^6.3.13"
"babel-helper-plugin-test-runner": "^6.8.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc