Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
logicalparadox committed Nov 18, 2012
1 parent d6aaf25 commit 3b7cd8d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 48 deletions.
48 changes: 23 additions & 25 deletions README.md
Expand Up @@ -133,7 +133,7 @@ indicate if the data at that index passed the query criteria.
```js
var query = { $or : [ { 'hello': true }, { 'universe': true } ] }
, q = filter(query)
, results= q.pass([
, result = q.pass([
{ hello: true }
, { universe: false }
, { hello: false, universe: true }
Expand All @@ -144,11 +144,11 @@ result.should
.be.an('array')
.and.have.length(4)
.and.deep.equal([
true
, false
, true
, false
]);
true
, false
, true
, false
]);
```


Expand Down Expand Up @@ -182,10 +182,10 @@ result.should

The following are the comparators implemented
for use as part of a query. They can also be used
for simple comparation, such as `filter.$eq(2,2)` which
would return `true`.
for simple comparation, such as `filter.comparators.$eq(2,2)`,
which would return `true`.

#### .$gt (a, b)
##### $gt (a, b)

* **@param** _{Number}_ a
* **@param** _{Number}_ b
Expand All @@ -194,7 +194,7 @@ would return `true`.
Assert `a` is greater than `b`.


#### .$gte (a, b)
##### $gte (a, b)

* **@param** _{Number}_ a
* **@param** _{Number}_ b
Expand All @@ -203,7 +203,7 @@ Assert `a` is greater than `b`.
Assert `a` is greater than or equal to `b`.


#### .$lt (a, b)
##### $lt (a, b)

* **@param** _{Number}_ a
* **@param** _{Number}_ b
Expand All @@ -212,7 +212,7 @@ Assert `a` is greater than or equal to `b`.
Assert `a` is less than `b`.


#### .$lte (a, b)
##### $lte (a, b)

* **@param** _{Number}_ a
* **@param** _{Number}_ b
Expand All @@ -221,7 +221,7 @@ Assert `a` is less than `b`.
Assert `a` is less than or equal to `b`.


#### .$all (a, b)
##### $all (a, b)

* **@param** _{Array}_ a
* **@param** _{Array}_ b
Expand All @@ -230,7 +230,7 @@ Assert `a` is less than or equal to `b`.
Assert `a` contains at least all items in `b`.


#### .$exists (a, b)
##### $exists (a, b)

* **@param** _{Mixed}_ a
* **@param** _{Boolean}_ b
Expand All @@ -239,7 +239,7 @@ Assert `a` contains at least all items in `b`.
Assert truthiness of `a` equals `b`.


#### .$mod (a, b)
##### $mod (a, b)

* **@param** _{Number}_ a
* **@param** _{Array}_ b
Expand All @@ -248,7 +248,7 @@ Assert truthiness of `a` equals `b`.
Assert `a` mod (`%`) `b[0]` equals `b[1]`.


#### .$eq (a, b)
##### $eq (a, b)

* **@param** _{Mixed}_ a
* **@param** _{Mixed}_ b
Expand All @@ -257,7 +257,7 @@ Assert `a` mod (`%`) `b[0]` equals `b[1]`.
Assert `a` equals (`===`) `b`.


#### .$eq (a, b)
##### $eq (a, b)

* **@param** _{Mixed}_ a
* **@param** _{Mixed}_ b
Expand All @@ -266,7 +266,7 @@ Assert `a` equals (`===`) `b`.
Assert `a` does not equal (`!==`) `b`.


#### .$in (a, b)
##### $in (a, b)

* **@param** _{Mixed}_ a
* **@param** _{Array}_ b
Expand All @@ -275,7 +275,7 @@ Assert `a` does not equal (`!==`) `b`.
Assert `a` is in `b` using `indexOf`.


#### .$nin (a, b)
##### $nin (a, b)

* **@param** _{Mixed}_ a
* **@param** _{Array}_ b
Expand All @@ -284,7 +284,7 @@ Assert `a` is in `b` using `indexOf`.
Assert `a` is not in `b` using `indexOf`.


#### .$size (a, b)
##### $size (a, b)

* **@param** _{Mixed}_ a
* **@param** _{Number}_ b
Expand All @@ -295,31 +295,29 @@ Assert `a` has length of `b`. Returns
property.


#### .$or (a)
##### $or (a)

* **@param** _{Array}_ a
* **@return** _{Boolean}_

Assert `a` has at least one truthy value.


#### .$nor (a)
##### $nor (a)

* **@param** _{Array}_ a
* **@return** _{Boolean}_

Assert `a` has zero truthy values.


#### .$and (a)
##### $and (a)

* **@param** _{Array}_ a
* **@return** _{Boolean}_

Assert `a` has all truthy values.



## License

(The MIT License)
Expand Down
46 changes: 23 additions & 23 deletions lib/filter.js
Expand Up @@ -168,7 +168,7 @@ Filter.prototype.subset = function (data) {
* ```js
* var query = { $or : [ { 'hello': true }, { 'universe': true } ] }
* , q = filter(query)
* , results= q.pass([
* , result = q.pass([
* { hello: true }
* , { universe: false }
* , { hello: false, universe: true }
Expand All @@ -179,11 +179,11 @@ Filter.prototype.subset = function (data) {
* .be.an('array')
* .and.have.length(4)
* .and.deep.equal([
* true
* , false
* , true
* , false
* ]);
* true
* , false
* , true
* , false
* ]);
* ```
*
* @param {Array} data
Expand Down Expand Up @@ -246,14 +246,14 @@ Filter.prototype.index = function (data) {
*
* The following are the comparators implemented
* for use as part of a query. They can also be used
* for simple comparation, such as `filter.$eq(2,2)` which
* would return `true`.
* for simple comparation, such as `filter.comparators.$eq(2,2)`,
* which would return `true`.
*/

Filter.comparators = {

/**
* #### .$gt (a, b)
* ##### $gt (a, b)
*
* Assert `a` is greater than `b`.
*
Expand All @@ -268,7 +268,7 @@ Filter.comparators = {
}

/**
* #### .$gte (a, b)
* ##### $gte (a, b)
*
* Assert `a` is greater than or equal to `b`.
*
Expand All @@ -283,7 +283,7 @@ Filter.comparators = {
}

/**
* #### .$lt (a, b)
* ##### $lt (a, b)
*
* Assert `a` is less than `b`.
*
Expand All @@ -298,7 +298,7 @@ Filter.comparators = {
}

/**
* #### .$lte (a, b)
* ##### $lte (a, b)
*
* Assert `a` is less than or equal to `b`.
*
Expand All @@ -313,7 +313,7 @@ Filter.comparators = {
}

/**
* #### .$all (a, b)
* ##### $all (a, b)
*
* Assert `a` contains at least all items in `b`.
*
Expand All @@ -331,7 +331,7 @@ Filter.comparators = {
}

/**
* #### .$exists (a, b)
* ##### $exists (a, b)
*
* Assert truthiness of `a` equals `b`.
*
Expand All @@ -346,7 +346,7 @@ Filter.comparators = {
}

/**
* #### .$mod (a, b)
* ##### $mod (a, b)
*
* Assert `a` mod (`%`) `b[0]` equals `b[1]`.
*
Expand All @@ -361,7 +361,7 @@ Filter.comparators = {
}

/**
* #### .$eq (a, b)
* ##### $eq (a, b)
*
* Assert `a` equals (`===`) `b`.
*
Expand All @@ -376,7 +376,7 @@ Filter.comparators = {
}

/**
* #### .$eq (a, b)
* ##### $eq (a, b)
*
* Assert `a` does not equal (`!==`) `b`.
*
Expand All @@ -391,7 +391,7 @@ Filter.comparators = {
}

/**
* #### .$in (a, b)
* ##### $in (a, b)
*
* Assert `a` is in `b` using `indexOf`.
*
Expand All @@ -406,7 +406,7 @@ Filter.comparators = {
}

/**
* #### .$nin (a, b)
* ##### $nin (a, b)
*
* Assert `a` is not in `b` using `indexOf`.
*
Expand All @@ -421,7 +421,7 @@ Filter.comparators = {
}

/**
* #### .$size (a, b)
* ##### $size (a, b)
*
* Assert `a` has length of `b`. Returns
* `false` if `a` does not have a length.
Expand All @@ -438,7 +438,7 @@ Filter.comparators = {
}

/**
* #### .$or (a)
* ##### $or (a)
*
* Assert `a` has at least one truthy value.
*
Expand All @@ -457,7 +457,7 @@ Filter.comparators = {
}

/**
* #### .$nor (a)
* ##### $nor (a)
*
* Assert `a` has zero truthy values.
*
Expand All @@ -476,7 +476,7 @@ Filter.comparators = {
}

/**
* #### .$and (a)
* ##### $and (a)
*
* Assert `a` has all truthy values.
*
Expand Down

0 comments on commit 3b7cd8d

Please sign in to comment.