Socket
Socket
Sign inDemoInstall

babel-types

Package Overview
Dependencies
Maintainers
6
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-types - npm Package Compare versions

Comparing version 6.21.0 to 6.22.0

12

lib/converters.js

@@ -31,6 +31,2 @@ "use strict";

var _isNumber = require("lodash/isNumber");
var _isNumber2 = _interopRequireDefault(_isNumber);
var _isRegExp = require("lodash/isRegExp");

@@ -40,6 +36,2 @@

var _isString = require("lodash/isString");
var _isString2 = _interopRequireDefault(_isString);
var _index = require("./index");

@@ -315,7 +307,7 @@

if ((0, _isString2.default)(value)) {
if (typeof value === "string") {
return t.stringLiteral(value);
}
if ((0, _isNumber2.default)(value)) {
if (typeof value === "number") {
return t.numericLiteral(value);

@@ -322,0 +314,0 @@ }

3

lib/definitions/es2015.js

@@ -216,2 +216,5 @@ "use strict";

validate: (0, _index.assertNodeType)("Identifier")
},
importKind: {
validate: (0, _index.assertOneOf)(null, "type", "typeof")
}

@@ -218,0 +221,0 @@ }

@@ -329,6 +329,2 @@ "use strict";

var _each = require("lodash/each");
var _each2 = _interopRequireDefault(_each);
var _uniq = require("lodash/uniq");

@@ -382,4 +378,4 @@

(0, _each2.default)(t.ALIAS_KEYS, function (aliases, type) {
(0, _each2.default)(aliases, function (alias) {
(0, _keys2.default)(t.ALIAS_KEYS).forEach(function (type) {
t.ALIAS_KEYS[type].forEach(function (alias) {
var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || [];

@@ -390,4 +386,4 @@ types.push(type);

(0, _each2.default)(t.FLIPPED_ALIAS_KEYS, function (types, type) {
t[type.toUpperCase() + "_TYPES"] = types;
(0, _keys2.default)(t.FLIPPED_ALIAS_KEYS).forEach(function (type) {
t[type.toUpperCase() + "_TYPES"] = t.FLIPPED_ALIAS_KEYS[type];
registerType(type);

@@ -441,3 +437,5 @@ });

(0, _each2.default)(t.BUILDER_KEYS, function (keys, type) {
(0, _keys2.default)(t.BUILDER_KEYS).forEach(function (type) {
var keys = t.BUILDER_KEYS[type];
function builder() {

@@ -444,0 +442,0 @@ if (arguments.length > keys.length) {

@@ -41,4 +41,4 @@ "use strict";

if (t.isExportDeclaration(id)) {
if (t.isDeclaration(node.declaration)) {
search.push(node.declaration);
if (t.isDeclaration(id.declaration)) {
search.push(id.declaration);
}

@@ -45,0 +45,0 @@ continue;

{
"name": "babel-types",
"version": "6.21.0",
"version": "6.22.0",
"description": "Babel Types is a Lodash-esque utility library for AST nodes",

@@ -11,3 +11,3 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

"dependencies": {
"babel-runtime": "^6.20.0",
"babel-runtime": "^6.22.0",
"esutils": "^2.0.2",

@@ -14,0 +14,0 @@ "lodash": "^4.2.0",

@@ -933,2 +933,3 @@ # babel-types

- `imported`: `Identifier` (required)
- `importKind`: `null | 'type' | 'typeof'` (default: `null`)

@@ -935,0 +936,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