Permalink
Browse files

adding docs, license, and npm stuff

  • Loading branch information...
1 parent bfd229f commit 00da434b35e1e377d2917d0935cf7a621c59092d @chesles committed Mar 9, 2013
Showing with 76 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +4 −0 .npmignore
  3. +7 −0 LICENSE.txt
  4. +37 −0 README.md
  5. +24 −0 package.json
View
@@ -0,0 +1,4 @@
+*~
+*.sw*
+build/
+node_modules
View
@@ -0,0 +1,4 @@
+*~
+*.sw*
+build/
+node_modules
View
@@ -0,0 +1,7 @@
+Copyright (c) 2013 John Chesley
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,37 @@
+# Colander
+
+Colander is a simple rule-based filtering tool. Keep the stuff you want,
+discard the stuff you don't.
+
+# installation
+
+ npm install colander
+
+# usage
+
+Code speaks louder than words, so here we go. Say we have some spaghetti that's
+just finished cooking, so it's still in the water...
+
+ var pot = [
+ {type: "spaghetti"},
+ {type: "water"},
+ {type: "spaghetti"},
+ {type: "water"},
+ {type: "water"},
+ {type: "spaghetti"},
+ {type: "spaghetti"},
+ {type: "water"},
+ ]
+
+ var colander = require('colander')
+ var strainer = colander({
+ accept_when: {"type": "spaghetti"},
+ reject_when: {"type": "water"}
+ })
+
+ // test some individual objects
+ strainer.strain({type: "spaghetti"}) // => true
+ strainer.strain({type: "water"}) // => false
+
+ // strain the whole pot at once
+ strainer.strain(pot)
View
@@ -0,0 +1,24 @@
+{
+ "name": "colander",
+ "version": "0.0.1",
+ "description": "Simple rule-based filtering",
+ "main": "colander.js",
+ "dependencies": {
+ "json-transcriber": "~0.0.1"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "test": "nodeunit test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/chesles/colander.git"
+ },
+ "keywords": [
+ "filtering",
+ "rules"
+ ],
+ "author": "John Chesley <john@chesl.es>",
+ "license": "MIT",
+ "readmeFilename": "README.md"
+}

0 comments on commit 00da434

Please sign in to comment.