Permalink
Browse files

- new AMD support

- no more git submodules
- better js styles
- update copyright
- make note in README
- add parallel() method as top level method
- remake, rebuild - bump minor package version
- fix parallel. closes #9
  • Loading branch information...
1 parent 84a3c58 commit c8f54f272e73ae8d3cb41331aec23a94916c70b3 @ded committed Sep 13, 2011
Showing with 221 additions and 212 deletions.
  1. +0 −6 .gitmodules
  2. +1 −0 Makefile
  3. +27 −6 README.md
  4. +0 −1 build/sink
  5. +0 −1 build/smoosh
  6. +21 −20 make/build.js
  7. +16 −12 package.json
  8. +2 −2 src/copyright.js
  9. +12 −11 src/ender.js
  10. +58 −64 src/valentine.js
  11. +2 −2 tests/index.html
  12. +19 −18 tests/tests.js
  13. +60 −66 valentine.js
  14. +3 −3 valentine.min.js
View
@@ -1,6 +0,0 @@
-[submodule "build/smoosh"]
- path = build/smoosh
- url = git://github.com/fat/smoosh.git
-[submodule "build/sink"]
- path = build/sink
- url = git://github.com/ded/sink-test.git
View
@@ -1,3 +1,4 @@
+.PHONY: boosh test
boosh:
node make/build.js
test:
View
@@ -106,8 +106,8 @@ Object Style
``` js
v(['a', 'b', 'c']).map(function (letter) {
- return letter.toUpperCase();
-}); // => ['A', 'B', 'C'];
+ return letter.toUpperCase()
+}); // => ['A', 'B', 'C']
```
Chains
@@ -116,8 +116,8 @@ Chains
``` js
v(['a', 'b', [['c']], 0, false,,,null,['a', 'b', 'c']])
.chain().flatten().compact().uniq().map(function (letter) {
- return letter.toUpperCase();
- }).value(); // => ['A', 'B', 'C'];
+ return letter.toUpperCase()
+ }).value(); // => ['A', 'B', 'C']
```
Ender Support
@@ -137,9 +137,11 @@ Have an existing Ender package? Include it:
Write code like a boss
``` js
+
+// as a top level method
$.v(['a', ['virus'], 'b', 'c']).reject(function (el, i) {
- return $.is.arr(el[i]);
-});
+ return $.is.arr(el[i])
+})
// top level methods in bridge
$.each
@@ -151,6 +153,25 @@ $.each
values
trim
bind
+ parallel
```
+Or just require the valentine module
+
+``` js
+!function (v) {
+ v(['a', ['virus'], 'b', 'c']).reject(function (el, i) {
+ return v.is.arr(el[i])
+ })
+}(require('valentine'))
+```
+
+## Developers
+Care to contribute? Make your edits to `src/valentine.js` and get your environment up and running
+
+ $ npm install --dev
+ $ make
+ $ make test
+ $ open tests/index.html
+
*Happy iterating*!
Submodule sink deleted from 5b8255
Submodule smoosh deleted from 22a6e2
View
@@ -1,24 +1,25 @@
require('smoosh').config({
"JAVASCRIPT": {
- "DIST_DIR": "./",
- "valentine": [
- "./src/copyright.js",
- "./src/valentine.js"
+ "DIST_DIR": "./"
+ , "valentine": [
+ "./src/copyright.js"
+ , "./src/valentine.js"
]
- },
- "JSHINT_OPTS": {
- "boss": true,
- "forin": false,
- "curly": false,
- "debug": false,
- "devel": false,
- "evil": false,
- "regexp": false,
- "undef": false,
- "sub": true,
- "white": false,
- "indent": 2,
- "whitespace": true,
- "asi": true
}
-}).run().build().analyze();
+ , "JSHINT_OPTS": {
+ "boss": true
+ , "forin": false
+ , "curly": false
+ , "debug": false
+ , "devel": false
+ , "evil": false
+ , "regexp": false
+ , "undef": false
+ , "sub": true
+ , "white": false
+ , "indent": 2
+ , "whitespace": true
+ , "asi": true
+ , "laxbreak": true
+ }
+}).run().build().analyze()
View
@@ -1,14 +1,18 @@
{
- "name": "valentine",
- "description": "JavaScripts Functional Sister. Utilitiy, Iterators, type checking",
- "version": "1.2.0",
- "homepage": "https://github.com/ded/valentine",
- "authors": "Dustin Diaz <@ded>",
- "repository": {
- "type": "git",
- "url": "https://github.com/ded/valentine.git"
- },
- "keywords": ["ender", "functional", "iteration", "type checking", "base"],
- "main": "./valentine.js",
- "ender": "./src/ender.js"
+ "name": "valentine"
+ , "description": "JavaScripts Functional Sister. Utilitiy, Iterators, type checking"
+ , "version": "1.3.1"
+ , "homepage": "https://github.com/ded/valentine"
+ , "author": "Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)"
+ , "keywords": ["ender", "functional", "iteration", "type checking", "base"]
+ , "main": "./valentine.js"
+ , "ender": "./src/ender.js"
+ , "repository": {
+ "type": "git"
+ , "url": "https://github.com/ded/valentine.git"
+ }
+ , "devDependencies": {
+ "sink-test": ">= 0.0.9"
+ , "smoosh": ">= 0.3.0"
+ }
}
View
@@ -1,6 +1,6 @@
/*!
- * Valentine: JavaScript's Sister
- * copyright Dustin Diaz 2011 (@ded)
+ * Valentine: JavaScript's functional Sister
+ * (c) Dustin Diaz 2011
* https://github.com/ded/valentine
* License MIT
*/
View
@@ -1,13 +1,14 @@
-var v = require('valentine');
-ender.ender(v);
+var v = require('valentine')
+ender.ender(v)
ender.ender({
- merge: v.merge,
- extend: v.extend,
- each: v.each,
- map: v.map,
- toArray: v.toArray,
- keys: v.keys,
- values: v.values,
- trim: v.trim,
- bind: v.bind
+ merge: v.merge
+ , extend: v.extend
+ , each: v.each
+ , map: v.map
+ , toArray: v.toArray
+ , keys: v.keys
+ , values: v.values
+ , trim: v.trim
+ , bind: v.bind
+ , parallel: v.parallel
})
Oops, something went wrong.

0 comments on commit c8f54f2

Please sign in to comment.