Socket
Socket
Sign inDemoInstall

io-ts

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io-ts - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

5

CHANGELOG.md

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

# 1.3.2
- **Bug Fix**
- dictionary type should not allow arrays, fix #218 (@gcanti)
# 1.3.1

@@ -18,0 +23,0 @@

9

lib/index.js

@@ -528,8 +528,9 @@ "use strict";

exports.DictionaryType = DictionaryType;
var refinedDictionary = exports.refinement(exports.Dictionary, function (d) { return Object.prototype.toString.call(d) === '[object Object]'; });
exports.dictionary = function (domain, codomain, name) {
if (name === void 0) { name = "{ [K in " + domain.name + "]: " + codomain.name + " }"; }
return new DictionaryType(name, function (m) {
return exports.Dictionary.is(m) && Object.keys(m).every(function (k) { return domain.is(k) && codomain.is(m[k]); });
}, function (m, c) {
var dictionaryValidation = exports.Dictionary.validate(m, c);
var isIndexSignatureRequired = codomain !== exports.any;
var D = isIndexSignatureRequired ? refinedDictionary : exports.Dictionary;
return new DictionaryType(name, function (m) { return D.is(m) && Object.keys(m).every(function (k) { return domain.is(k) && codomain.is(m[k]); }); }, function (m, c) {
var dictionaryValidation = D.validate(m, c);
if (dictionaryValidation.isLeft()) {

@@ -536,0 +537,0 @@ return dictionaryValidation;

{
"name": "io-ts",
"version": "1.3.1",
"version": "1.3.2",
"description": "TypeScript compatible runtime type system for IO validation",

@@ -47,3 +47,3 @@ "files": [

"tslint-config-standard": "7.0.0",
"typescript": "^3.1.1"
"typescript": "^3.1.3"
},

@@ -50,0 +50,0 @@ "tags": [

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