Permalink
Browse files

add reduce component usage. Closes #90

  • Loading branch information...
1 parent 36fedc3 commit d9271a2994cb1b2d083113228b1cbd8a0e91c08b @tj tj committed Jan 3, 2013
Showing with 9 additions and 7 deletions.
  1. +2 −2 Makefile
  2. +3 −2 component.json
  3. +4 −3 lib/client.js
View
@@ -38,6 +38,6 @@ test-docs:
> docs/test.html
clean:
- rm -f superagent.js
+ rm -fr superagent.js components
-.PHONY: test-cov test docs test-docs clean
+.PHONY: test-cov test docs test-docs clean
View
@@ -14,7 +14,8 @@
],
"main": "lib/client.js",
"dependencies": {
- "component/emitter": "0.0.6"
+ "component/emitter": "*",
+ "RedVentures/reduce": "*"
},
"license": "MIT"
-}
+}
View
@@ -3,7 +3,8 @@
* Module dependencies.
*/
-var Emitter = require('emitter');
+var Emitter = require('emitter')
+ , reduce = require('reduce');
/**
* Root reference for iframes.
@@ -207,7 +208,7 @@ function type(str){
*/
function params(str){
- return str.split(/ *; */).reduce(function(obj, str){
+ return reduce(str.split(/ *; */), function(obj, str){
var parts = str.split(/ *= */)
, key = parts.shift()
, val = parts.shift();
@@ -827,4 +828,4 @@ request.put = function(url, data, fn){
* Expose `request`.
*/
-module.exports = request;
+module.exports = request;

0 comments on commit d9271a2

Please sign in to comment.