Permalink
Browse files

Added support for node.js, npm, and ender.

  • Loading branch information...
1 parent ed3347e commit 25f640d00150304dbcf5f594c2b638f9e1411b14 @trek committed Oct 19, 2011
Showing with 37 additions and 4 deletions.
  1. +0 −1 Rakefile
  2. +18 −0 package.json
  3. +19 −3 public/javascripts/fleck.js
View
@@ -1,3 +1,2 @@
-
require 'jasmine'
load 'jasmine/tasks/jasmine.rake'
View
@@ -0,0 +1,18 @@
+{
+ "name": "fleck",
+ "description": "a functional-style string inflection library",
+ "version": "0.5.0",
+ "keywords": ['fleck', 'ender', 'sting', 'inflection', 'pluralize']
+ "homepage": "http://example.com",
+ "author": "Trek Glowacki <trek.glowacki@gmail.com> (http://github.com/trek)",
+ "contributors": [
+ "Joe Fiorini <> (https://github.com/joefiorini)"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/trek/fleck.git"
+ },
+ "dependencies": {},
+ "main": "./public/javascripts/fleck.js",
+ "ender": "./src/exports/ender.js"
+}
@@ -1,5 +1,17 @@
-window.fleck = function(){
- lib = {
+/*!
+ * fleck - functional style string inflections
+ * https://github.com/trek/fleck
+ * copyright Trek Glowacki
+ * MIT License
+ */
+
+!function (name, definition) {
+ if (typeof module != 'undefined') module.exports = definition()
+ else if (typeof define == 'function' && typeof define.amd == 'object') define(definition)
+ else this[name] = definition()
+}('fleck', function () {
+
+ var lib = {
// plural rules, singular rules, and starting uncountables
// from http://code.google.com/p/inflection-js/
// with corrections for ordering and spelling
@@ -180,6 +192,9 @@ window.fleck = function(){
.replace(/-/g, '_')
.toLowerCase();
},
+
+ // add an uncountable word
+ // fleck.uncountable('ninja', 'tsumani');
uncountable: function(){
for(var i=0,l=arguments.length; i<l; i++){
lib.uncountableWords[arguments[i]] = true;
@@ -189,4 +204,5 @@ window.fleck = function(){
};
return lib;
-}()
+
+});

0 comments on commit 25f640d

Please sign in to comment.