Socket
Socket
Sign inDemoInstall

ast-types

Package Overview
Dependencies
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-types - npm Package Compare versions

Comparing version 0.3.37 to 0.3.38

2

def/core.js

@@ -19,3 +19,3 @@ var types = require("../lib/types");

null
), defaults["null"]);
), defaults["null"], true);

@@ -22,0 +22,0 @@ def("SourceLocation")

@@ -281,10 +281,14 @@ var assert = require("assert");

Def.fromValue = function(value) {
if (isObject.check(value) &&
hasOwn.call(value, "type") &&
hasOwn.call(defCache, value.type))
{
var vDef = defCache[value.type];
assert.strictEqual(vDef.finalized, true);
return vDef;
if (value && typeof value === "object") {
var type = value.type;
if (typeof type === "string" &&
hasOwn.call(defCache, type)) {
var d = defCache[type];
if (d.finalized) {
return d;
}
}
}
return null;
};

@@ -291,0 +295,0 @@

@@ -21,3 +21,3 @@ {

],
"version": "0.3.37",
"version": "0.3.38",
"homepage": "http://github.com/benjamn/ast-types",

@@ -24,0 +24,0 @@ "repository": {

@@ -277,5 +277,3 @@ var assert = require("assert");

it("should give correct keys for supertypes", function() {
check({ type: "Expression" }, [
"type", "loc"
]);
check({ type: "Expression" }, ["type"]);
});

@@ -296,3 +294,3 @@

// Note that the "handlers" field is now hidden from eachField.
"type", "block", "handler", "guardedHandlers", "finalizer", "loc"
"type", "block", "handler", "guardedHandlers", "finalizer"
]);

@@ -302,3 +300,3 @@ });

check({ type: "CatchClause" }, [
"type", "param", "guard", "body", "loc"
"type", "param", "guard", "body"
]);

@@ -305,0 +303,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