Socket
Socket
Sign inDemoInstall

@lanetix/type-visitor

Package Overview
Dependencies
0
Maintainers
18
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.1.1

16

lib/index.js

@@ -17,3 +17,4 @@ /* eslint-disable no-new-wrappers */

sum: 'sum',
product: 'product'
product: 'product',
price: 'price'
};

@@ -74,2 +75,5 @@

return varop(down, acc, { fun: tyfun.product, args: args, ctx: ctx });
},
price: function price(acc, ctx) {
return prim(acc, { fun: tyfun.price, ctx: ctx });
}

@@ -91,2 +95,3 @@ };

var product = _ref6.product;
var price = _ref6.price;

@@ -203,2 +208,4 @@ var visitInner = function visitInner(acc, _ref7) {

return check_varop({ tag: visitContext.productChild, check: product });
case tyfun.price:
return check_primitive(price);
default:

@@ -277,2 +284,5 @@ throw new Error('invalid type function');

});
},
price: function price(exp) {
return typeof exp === 'number' && Number.isFinite(exp);
}

@@ -307,2 +317,4 @@ });

return builtin('product');
case tyfun.price:
return builtin('price');
default:

@@ -342,2 +354,4 @@ // should be unreachable since this is only called internally from visit.

return tyfun.product;
case 'price':
return tyfun.price;
default:

@@ -344,0 +358,0 @@ throw new Error('invalid type function name');

2

package.json
{
"name": "@lanetix/type-visitor",
"version": "4.1.0",
"version": "4.1.1",
"description": "visit your types",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -36,2 +36,6 @@ @lanetix/type-visitor

#### `tyfun.string`
#### `tyfun.price`
### Uniary Types

@@ -231,7 +235,7 @@

structure should be considered an opaque implementation detail--it should not
be used directly, except in order to pass it into intoTy.
be used directly, except in order to pass it into toTy.
### `intoTy`
### `toTy`
Takes a JSON structure created by toJson and parses it into a type tree. It
should only be used on JSON that was previously formed through toJson;
constructing the JSON directly isn't guaranteed to work.
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc