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

flowcheck

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flowcheck - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

5

CHANGELOG.md

@@ -13,2 +13,7 @@ # Changelog

## v0.2.6
- **Bug Fix**
+ empty shapes are interpreted as dicts #20
## v0.2.5

@@ -15,0 +20,0 @@

2

package.json
{
"name": "flowcheck",
"version": "0.2.5",
"version": "0.2.6",
"description": "Runtime type checking for Flow",

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

@@ -140,12 +140,12 @@ 'use strict';

case Syntax.ObjectTypeAnnotation :
if (ann.properties.length) {
// handle `{p1: T1; p2: T2; ... pn: Tn;}`
return this.getProperty('shape') + '({' + ann.properties.map(function (prop) {
return getObjectKey(prop.key) + ': ' + this.getType(prop.value);
}.bind(this)).join(', ') + '})';
if (ann.indexers && ann.indexers[0]) {
// handle `{[key: D]: C}`
var domain = this.getType(ann.indexers[0].key);
var codomain = this.getType(ann.indexers[0].value);
return this.getProperty('dict') + '(' + domain + ', ' + codomain + ')';
}
// handle `{[key: D]: C}`
var domain = this.getType(ann.indexers[0].key);
var codomain = this.getType(ann.indexers[0].value);
return this.getProperty('dict') + '(' + domain + ', ' + codomain + ')';
// handle `{p1: T1; p2: T2; ... pn: Tn;}`
return this.getProperty('shape') + '({' + ann.properties.map(function (prop) {
return getObjectKey(prop.key) + ': ' + this.getType(prop.value);
}.bind(this)).join(', ') + '})';

@@ -152,0 +152,0 @@ case Syntax.UnionTypeAnnotation :

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