Permalink
Browse files

Added lingo.uncountable()

  • Loading branch information...
tj committed Sep 24, 2010
1 parent 1359902 commit 9be4310f5c570648558c8837a3b0dc71f955218e
Showing with 28 additions and 3 deletions.
  1. +3 −0 .gitmodules
  2. +13 −1 lib/lingo.js
  3. +1 −0 support/expresso
  4. +11 −2 test/lingo.test.js
View
@@ -0,0 +1,3 @@
+[submodule "support/expresso"]
+ path = support/expresso
+ url = git://github.com/visionmedia/expresso.git
View
@@ -19,4 +19,16 @@ exports.version = '0.0.1'
* @type Array
*/
-exports.uncountable = require('./uncountable');
+exports.uncountables = require('./uncountables');
+
+/**
+ * Check if a `word` is uncountable.
+ *
+ * @param {String} word
+ * @return {Boolean}
+ * @api public
+ */
+
+exports.uncountable = function(word){
+ return !!~exports.uncountables.indexOf(word);
+};
Submodule expresso added at 2ea263
View
@@ -3,10 +3,19 @@
* Module dependencies.
*/
-var chrono = require('chrono');
+var lingo = require('lingo');
module.exports = {
'test .version': function(assert){
- assert.match(chrono.version, /^\d+\.\d+\.\d+$/);
+ assert.match(lingo.version, /^\d+\.\d+\.\d+$/);
+ },
+
+ 'test .uncountables': function(assert){
+ assert.ok(lingo.uncountables);
+ },
+
+ 'test .uncountable()': function(assert){
+ assert.equal(true, lingo.uncountable('moose'));
+ assert.equal(false, lingo.uncountable('person'));
}
}

0 comments on commit 9be4310

Please sign in to comment.