New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@algebraic/ast

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algebraic/ast - npm Package Compare versions

Comparing version 1.0.0-alpha.12 to 1.0.0-alpha.13

40

expressions.js

@@ -15,3 +15,4 @@ const { is, data, nullable, array, or } = require("@algebraic/type");

take => `left.freeVariables`,
take => `right.freeVariables` ) );
take => `right.freeVariables`,
take => `left.bindingNames` ) );

@@ -25,3 +26,3 @@ exports.IdentifierExpression = Node `IdentifierExpression` (

exports.ArrowFunctionExpression = Node `ArrowFunctionExpression` (
body => or (Node.BlockStatment, Node.Expression),
body => or (Node.BlockStatement, Node.Expression),
([id]) => data.always (null),

@@ -33,5 +34,9 @@ params => array(nullable(Node.RootPattern)),

([varBindings]) => compute (StringSet,
take => `params.bindingNames` ),
([freeVariables]) => compute (StringSet,
take => `body.freeVariables`,
take => `params.freeVariables`) );
take => `params.freeVariables`,
subtract => `varBindings` ) );

@@ -46,10 +51,14 @@ exports.FunctionExpression = Node `FunctionExpression` (

([varBindings]) => compute (StringSet,
take => `id.bindingNames`,
take => `body.varBindingNames`,
take => `params.bindingNames`,
take => StringSet(["arguments"]) ),
([freeVariables]) => compute (StringSet,
take => `body.freeVariables`,
take => `params.freeVariables`,
subtract => `id.bindingNames`,
subtract => StringSet(["arguments"]) ) );
subtract => `varBindings` ) );
exports.ArrayExpression = Node `ArrayExpression` (
elements => array(Node.Expression),
elements => array(nullable(or (Node.Expression, Node.SpreadElement))),
([freeVariables]) => compute (StringSet,

@@ -59,4 +68,4 @@ take => `elements.freeVariables`) );

exports.CallExpression = Node `CallExpression` (
callee => Expression,
arguments => array(Expression),
callee => Node.Expression,
arguments => array(or (Node.Expression, SpreadElement)),
([freeVariables]) => compute (StringSet,

@@ -114,3 +123,3 @@ take => `callee.freeVariables`,

callee => Node.Expression,
arguments => array(Node.Expression),
arguments => array(or (Node.Expression, Node.SpreadElement)),
([freeVariables]) => compute (StringSet,

@@ -160,3 +169,3 @@ take => `callee.freeVariables`,

exports.ObjectPropertyShorthand = data `ObjectPropertyShorthand` (
exports.ObjectPropertyShorthand = Node `ObjectPropertyShorthand` (
({override:type}) => "ObjectProperty",

@@ -173,3 +182,3 @@

exports.ObjectPropertyLonghand = data `ObjectPropertyLonghand` (
exports.ObjectPropertyLonghand = Node `ObjectPropertyLonghand` (
({override:type}) => "ObjectProperty",

@@ -193,7 +202,12 @@

exports.ObjectExpression = data `ObjectExpression` (
properties => array (Node.ObjectProperty),
exports.ObjectExpression = Node `ObjectExpression` (
properties => array ( or(Node.ObjectProperty, Node.SpreadElement)),
([freeVariables]) => compute (StringSet,
take => `properties.freeVariables`) );
exports.SpreadElement = Node `SpreadElement` (
argument => Node.Expression,
([freeVariables]) => compute (StringSet,
take => `argument.freeVariables`) );
Object.assign(exports, require("./literals"));

@@ -200,0 +214,0 @@

{
"name": "@algebraic/ast",
"version": "1.0.0-alpha.12",
"version": "1.0.0-alpha.13",
"description": "",

@@ -18,5 +18,5 @@ "main": "node.js",

"peerDependencies": {
"@algebraic/type": "1.0.0-alpha.12",
"@algebraic/collectoons": "1.0.0-alpha.12"
"@algebraic/type": "1.0.0-alpha.13",
"@algebraic/collectoons": "1.0.0-alpha.13"
}
}

@@ -20,4 +20,5 @@ const { is, data, or, boolean, string, type, array } = require("@algebraic/type");

name => string,
([bindingNames]) => compute (StringSet, take => `name`),
([freeVariables]) => compute (StringSet, take => `name`) );
([bindingNames]) => compute (StringSet,
take => `name`),
([freeVariables]) => compute.empty (StringSet) );

@@ -24,0 +25,0 @@ exports.RestElement = Node `RestElement` (

@@ -28,4 +28,6 @@ const { is, data, nullable, array, or } = require("@algebraic/type");

([varBindings]) => compute (StringSet, take => `body.varBindings`),
([blockBindings]) => compute (StringSet, take => `body.blockBindingNames`),
([varBindings]) => compute (StringSet,
take => `body.varBindingNames`),
([blockBindings]) => compute (StringSet,
take => `body.blockBindingNames`),
([freeVariables]) => compute (StringSet,

@@ -47,4 +49,6 @@ take => `body.freeVariables`,

([varBindings]) => compute (StringSet, take => `body.varBindings`),
([blockBindings]) => compute (StringSet, take => `body.blockBindingNames`),
([varBindings]) => compute (StringSet,
take => `body.varBindingNames`),
([blockBindings]) => compute (StringSet,
take => `body.blockBindingNames`),
([freeVariables]) => compute (StringSet,

@@ -51,0 +55,0 @@ take => `body.freeVariables`,

@@ -81,15 +81,15 @@ const { is, data, nullable, array, or } = require("@algebraic/type");

([varBindings]) => compute (StringSet,
take => `body.varBindingNames` ),
([varBindingNames]) => compute.empty (StringSet),
([blockBindingNames]) => compute (StringSet,
take => `id.bindingNames`),
([varBindings]) => compute (StringSet,
take => `id.bindingNames`,
take => `params.bindingNames`,
take => `body.varBindingNames`,
take => StringSet(["arguments"]) ),
([freeVariables]) => compute (StringSet,
take => `id.freeVariables`,
take => `params.freeVariables`,
take => `body.freeVariables`,
subtract => `id.bindingNames`,
subtract => `params.bindingNames`,
subtract => StringSet(["arguments"]) ) );
subtract => `varBindings` ) );

@@ -256,4 +256,3 @@ exports.IfStatement = Node `IfStatement` (

take => `init.freeVariables`,
take => `id.freeVariables`,
subtract => `id.bindingNames` ) );
take => `id.freeVariables` ) );

@@ -268,3 +267,3 @@ exports.VarVariableDeclaration = Node `VarVariableDeclaration` (

([varBindingBames]) => compute (StringSet,
([varBindingNames]) => compute (StringSet,
take => `declarators.bindingNames`),

@@ -274,3 +273,3 @@ ([blockBindingNames]) => compute.empty (StringSet),

take => `declarators.freeVariables`,
subtract => `varBindingBames` ) );
subtract => `varBindingNames` ) );

@@ -277,0 +276,0 @@ exports.BlockVariableDeclaration = Node `BlockVariableDeclaration` (

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