Comparing version 3.2.27 to 3.2.28
@@ -15,2 +15,7 @@ # Changelog | ||
# v3.2.28 | ||
- **Bug Fix** | ||
- Enums.is() with an array value should always be false, #327 (@phorsuedzie) | ||
# v3.2.27 | ||
@@ -17,0 +22,0 @@ |
var assert = require('./assert'); | ||
var isTypeName = require('./isTypeName'); | ||
var forbidNewOperator = require('./forbidNewOperator'); | ||
var isNumber = require('./isNumber'); | ||
var isString = require('./isString'); | ||
@@ -41,3 +42,3 @@ var isObject = require('./isObject'); | ||
Enums.is = function (x) { | ||
return map.hasOwnProperty(x); | ||
return (isString(x) || isNumber(x)) && map.hasOwnProperty(x); | ||
}; | ||
@@ -44,0 +45,0 @@ |
{ | ||
"name": "tcomb", | ||
"version": "3.2.27", | ||
"version": "3.2.28", | ||
"description": "Type checking and DDD for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,2 +13,9 @@ [![build status](https://img.shields.io/travis/gcanti/tcomb/master.svg?style=flat-square)](https://travis-ci.org/gcanti/tcomb) | ||
# IMPORTANT: Running in production | ||
tcomb is supposed to be used in **development** and is **disabled in production**. | ||
If you want type checks in production you may use | ||
- [tcomb-validation](https://github.com/gcanti/tcomb-validation) | ||
- [io-ts](https://github.com/gcanti/io-ts) | ||
# Setup | ||
@@ -138,3 +145,3 @@ | ||
All models are inspectable at runtime. You can read and reuse the informations stored in your types (in the `meta` static member). See [The meta object](docs/GUIDE.md#the-meta-object) in the docs for details. | ||
All models are inspectable at runtime. You can read and reuse the information stored in your types (in the `meta` static member). See [The meta object](docs/GUIDE.md#the-meta-object) in the docs for details. | ||
@@ -147,3 +154,3 @@ Libraries exploiting tcomb's RTI: | ||
**Easy JSON serialization / deseralization** | ||
**Easy JSON serialization / deserialization** | ||
@@ -150,0 +157,0 @@ Encodes / decodes your domain models to / from JSON for free. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92749
1979
249