Socket
Socket
Sign inDemoInstall

io-ts

Package Overview
Dependencies
1
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.10.0 to 1.10.1

7

CHANGELOG.md

@@ -17,4 +17,11 @@ # Changelog

# 1.10.1
- **Bug Fix**
- handle `strict`, `exact` and `refinement` codecs when optimizing tagged unions, fix #339 (@gcanti)
# 1.10.0
**Note**. `io-ts` depends on [`fp-ts`](https://github.com/gcanti/fp-ts), starting from `1.10.0` you must install `fp-ts` manually (`fp-ts` is now a `peerDependency`)
- **New Feature**

@@ -21,0 +28,0 @@ - make `io-ts` compatible with both `fp-ts@1.x`, `fp-ts@2.x` (@gcanti)

16

es6/index.js

@@ -1266,2 +1266,13 @@ var __extends = (this && this.__extends) || (function () {

}
// tslint:disable-next-line: deprecation
function isStrictC(codec) {
return codec._tag === 'StrictType';
}
function isExactC(codec) {
return codec._tag === 'ExactType';
}
// tslint:disable-next-line: deprecation
function isRefinementC(codec) {
return codec._tag === 'RefinementType';
}
function isIntersectionC(codec) {

@@ -1284,3 +1295,3 @@ return codec._tag === 'IntersectionType';

}
if (isTypeC(codec)) {
if (isTypeC(codec) || isStrictC(codec)) {
var index = emptyTags;

@@ -1299,2 +1310,5 @@ // tslint:disable-next-line: forin

}
else if (isExactC(codec) || isRefinementC(codec)) {
return getTags(codec.type);
}
else if (isIntersectionC(codec)) {

@@ -1301,0 +1315,0 @@ return codec.types.reduce(function (tags, codec) { return mergeTags(tags, getTags(codec)); }, emptyTags);

@@ -1266,2 +1266,13 @@ "use strict";

}
// tslint:disable-next-line: deprecation
function isStrictC(codec) {
return codec._tag === 'StrictType';
}
function isExactC(codec) {
return codec._tag === 'ExactType';
}
// tslint:disable-next-line: deprecation
function isRefinementC(codec) {
return codec._tag === 'RefinementType';
}
function isIntersectionC(codec) {

@@ -1284,3 +1295,3 @@ return codec._tag === 'IntersectionType';

}
if (isTypeC(codec)) {
if (isTypeC(codec) || isStrictC(codec)) {
var index = exports.emptyTags;

@@ -1299,2 +1310,5 @@ // tslint:disable-next-line: forin

}
else if (isExactC(codec) || isRefinementC(codec)) {
return getTags(codec.type);
}
else if (isIntersectionC(codec)) {

@@ -1301,0 +1315,0 @@ return codec.types.reduce(function (tags, codec) { return mergeTags(tags, getTags(codec)); }, exports.emptyTags);

2

package.json
{
"name": "io-ts",
"version": "1.10.0",
"version": "1.10.1",
"description": "TypeScript compatible runtime type system for IO validation",

@@ -5,0 +5,0 @@ "files": [

@@ -11,2 +11,4 @@ [![build status](https://img.shields.io/travis/gcanti/io-ts/master.svg?style=flat-square)](https://travis-ci.org/gcanti/io-ts)

- [Installation](#installation)
- [The idea](#the-idea)

@@ -33,2 +35,12 @@ - [TypeScript compatibility](#typescript-compatibility)

# Installation
To install the stable version:
```sh
npm i io-ts
```
**Note**. `io-ts` depends on [`fp-ts`](https://github.com/gcanti/fp-ts), starting from `1.10.0` you must install `fp-ts` manually (`fp-ts` is now a `peerDependency`)
# The idea

@@ -35,0 +47,0 @@

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