Skip to content

Commit 37def5a

Browse files
committed
Merge pull request #1 from LoudBit/i-put-a-test-on-you
v2.0.0
2 parents 0e1cdd6 + 6b31725 commit 37def5a

26 files changed

+1277
-2429
lines changed

README.md

Lines changed: 9 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,30 @@
1-
# is-it
1+
# is-too
22

3-
A simple comparison module striving for code minimalism and a thorough test suite.
3+
A simple type checker slash validarion module striving for code minimalism and a thorough test suite.
44

5-
Pair `is` with [the-thing-is](https://github.com/mrDarcyMurphy/the-thing-is) for broader validation.
6-
7-
[![browser support](http://ci.testling.com/mrDarcyMurphy/is.png)](http://ci.testling.com/mrDarcyMurphy/is)
5+
[![browser support](http://ci.testling.com/LoudBit/is-too.png)](http://ci.testling.com/LoudBit/is-too)
86

97
## Installation
108

119
```
12-
npm install is-it
10+
npm install is-too
1311
```
1412

1513
## Usage
1614

1715
```javascript
18-
var is = require('is-it')
16+
var is = require('is-too')
1917

20-
var metal = "666"; // |..|. .|..|
18+
var metal = "666" // |..|. .|..|
2119

22-
if (is.present(metal) && is.aNumber(metal)) {
23-
headBang();
20+
if (is.present(metal) && is.integer(metal)) {
21+
headBang()
2422
}
2523
```
2624

2725
For now, check the source and tests for a full run down of how things work.
2826

2927

30-
## Comparisons
31-
32-
### Operators
33-
34-
* `present`
35-
* `equal`, `eq`
36-
* `greaterThan`, `gt`
37-
* `greaterThanOrEqualTo`, `gte`
38-
* `lessThan`, `lt`
39-
* `lessThanOrEqualTo`, `lte`
40-
41-
### Primitives
42-
43-
* `boolean`, `bool`
44-
* `nil`
45-
* `undef`
46-
47-
### Objects
48-
49-
* `object`, `obj`
50-
* `plainObject`
51-
* `args`
52-
* `array`, `arr`
53-
* `func`
54-
55-
### Strings
56-
57-
* `string`, `str`
58-
* `emptyString`, `emtStr`
59-
60-
### Numbers
61-
62-
* `number`, `num`
63-
* `aNumber`, `aNum`
64-
* `integer`, `int`
65-
* `aInteger`, `aInt`
66-
* `zero`
67-
* `aZero`
68-
69-
### Dates
70-
71-
* `date`
72-
* `sameDate`
73-
* `today`
74-
* `futureDate`, `future`
75-
* `pastDate`, `past`
76-
7728
### Antonyms
7829

7930
`is.not[methodName]` will return the inverse all methods.
@@ -85,4 +36,4 @@ is.not.greaterThan(1, 2) // true : 1 is not greater than 2
8536
## Helpers
8637

8738
* `toInteger`, `toInt`: converts a number to an integer, and `NaN` to `null` because you can do math with `null`.
88-
* `toNumber`, `toNum`: same, but respects decimals.
39+
* `toNumber`, `toNum`: same as `toInt`, but respects decimals.

0 commit comments

Comments
 (0)