Skip to content
Browse files

Forgot to add type attribute

  • Loading branch information...
1 parent 96a5388 commit 72772d45f1a6a95a6b658ab000ac8fe7321570ad @davehamptonusa committed
Showing with 15 additions and 1 deletion.
  1. +15 −1 README.md
View
16 README.md
@@ -40,7 +40,7 @@ As a side note, asynchronous assignments can easily be handled through using a m
//To add a new type, "globally"
expound.addType('isLessThanTen', function (value) {
- return (expound.types.isNumber(value) && value < 10) ? true: false;
+ return expound.types.isNumber(value) && value < 10;
});
```
@@ -135,6 +135,20 @@ These are the attributes for the `property() method`
> In most cases it is better to use a coercion to augment the right-hand value on the way in, a type to validate a right-hand value and a trigger to enact some form of code on the way out.
+<A NAME="type" />
+### type
+> The type attribute allows you to specify the type of the attibute for type checking. You can add your own custom types at the object or "global" level.
+
+> Types you get for free are provided through [underscore](http://documentcloud.github.com/underscore):
+
+* isBoolean
+* isArray
+* isDate
+* isFunction
+* isNumber
+* isRegExp
+* isString
+
## Methods
<A NAME="expound" />

0 comments on commit 72772d4

Please sign in to comment.
Something went wrong with that request. Please try again.