Comparing version 1.1.0 to 1.2.0
@@ -8,7 +8,7 @@ 'use strict'; | ||
if (/^(?:y|yes|true)$/i.test(val)) { | ||
if (/^(?:y|yes|true|1)$/i.test(val)) { | ||
return true; | ||
} | ||
if (/^(?:n|no|false)$/i.test(val)) { | ||
if (/^(?:n|no|false|0)$/i.test(val)) { | ||
return false; | ||
@@ -15,0 +15,0 @@ } |
{ | ||
"name": "yn", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Parse yes/no like values", | ||
@@ -10,4 +10,8 @@ "license": "MIT", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "http://sindresorhus.com" | ||
"url": "sindresorhus.com" | ||
}, | ||
"contributors": [ | ||
"Justin Woo <moomoowoo@gmail.com>", | ||
"Mark Stosberg <mark@rideamigos.com>" | ||
], | ||
"engines": { | ||
@@ -17,3 +21,3 @@ "node": ">=0.10.0" | ||
"scripts": { | ||
"test": "node test.js" | ||
"test": "xo && ava" | ||
}, | ||
@@ -39,4 +43,5 @@ "files": [ | ||
"devDependencies": { | ||
"ava": "0.0.4" | ||
"ava": "*", | ||
"xo": "*" | ||
} | ||
} |
@@ -12,3 +12,3 @@ # yn [![Build Status](https://travis-ci.org/sindresorhus/yn.svg?branch=master)](https://travis-ci.org/sindresorhus/yn) | ||
```js | ||
'y', 'yes', 'true', true, 'n', 'no', 'false', false | ||
'y', 'yes', 'true', true, 1, 'n', 'no', 'false', false, 0 | ||
``` | ||
@@ -21,3 +21,3 @@ | ||
```sh | ||
``` | ||
$ npm install --save yn | ||
@@ -24,0 +24,0 @@ ``` |
4259
5
2