Socket
Socket
Sign inDemoInstall

ast-types

Package Overview
Dependencies
10
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.2 to 0.2.3

17

lib/types.js

@@ -403,7 +403,18 @@ var assert = require("assert");

var type = field.type;
var value = (isNumber.check(i) && i < argc)
? args[i]
var value;
if (isNumber.check(i) && i < argc) {
value = args[i];
} else if (field.defaultFn) {
// Expose the partially-built object to the default
// function as its `this` object.
: field.defaultFn.call(built);
value = field.defaultFn.call(built);
} else {
var message = "no value or default function given for field " +
JSON.stringify(param) + " of " + typeName + "(" +
buildParams.map(function(name) {
return all[name];
}).join(", ") + ")";
assert.ok(false, message);
}

@@ -410,0 +421,0 @@ assert.ok(

2

package.json

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

],
"version": "0.2.2",
"version": "0.2.3",
"homepage": "http://github.com/benjamn/ast-types",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc