Permalink
Browse files

bump version to 0.3.0

async no longer supported
  • Loading branch information...
1 parent 86406ba commit c20b9565af0a392ed9abdad1d6cde9a70e01cae0 @dominictarr committed May 27, 2011
Showing with 46 additions and 1,034 deletions.
  1. +1 −1 index.js
  2. +2 −2 package.json
  3. +0 −135 test/iterator.async.asynct.js
  4. +1 −1 test/iterator.sync.expresso.js
  5. +1 −1 test/simple.synct.js
  6. +0 −370 test/traverser.asynct.js
  7. +0 −303 test/traverser.expresso.js
  8. +1 −1 test/traverser.synct.js
  9. +40 −87 traverser.js
  10. +0 −133 traverser.sync.js
View
@@ -1,4 +1,4 @@
var e = module.exports = require('./traverser')
-e.sync = require('./traverser.sync')
+//e.sync = require('./traverser.sync')
e.iterators = require('./iterators')
View
@@ -1,11 +1,11 @@
{
"name": "traverser",
"description": "lib for traversing trees and graphs",
- "version": "0.0.2-2",
+ "version": "0.0.3",
"homepage": "https://github.com/dominictarr/traverser",
"repository": "git://github.com/dominictarr/traverser.git",
"author": "Dominic Tarr <dominic.tarr@gmail.com>",
- "main": "./index",
+ "main": "./traverser.sync",
"directories": {
"lib": ".",
"example": "examples"
@@ -1,135 +0,0 @@
-//test iterator.async.expresso
-
-var async = require('traverser/iterators').async
- , describe = require('should').describe
-/*
- each
- find
- map
- copy
- min
- max
-*/
-
-function value (v,k,n,o){
- describe(v,'value at object[' + k + '] in ' + arguments.callee.name)
- .should.eql(o[k],v)
- n(v)
-}
-function valuePlus (v,k,n,o){
- describe(v,'value at object[' + k + '] in ' + arguments.callee.name)
- .should.eql(o[k],v)
- n('object' === typeof v ? v : v + 1)
-}
-
-exports.max = function (test){
- var l = [234,543,1,44,5555,534,6,456]
- async.max(l,value,c)
- function c(r){
-
- describe(r,'max()')
- .should.eql(5555)
-
- test.finish()
- }
-}
-exports.min = function (test){
- var l = [234,543,1,44,5555,534,6,456]
- async.min(l,value,c)
- function c(r){
-
- describe(r,'min()')
- .should.eql(1)
-
- test.finish()
- }
-}
-exports.copy = function (test){
- var l = [234,543,1,44,5555,534,6,456]
- , o = {a: 123, b: 123, c:'sdf', l: l}
- async.copy(l,value,c)
- function c(r){
- describe(r,'copy()')
- .should.eql(l)
-
- async.copy(o,value,c)
- function c(r){
-
- describe(r,'copy()')
- .should.eql(o)
-
- test.finish()
- }
- }
-}
-
-exports.map = function (test){
- var l = [234,543,1,44,5555,534,6,456]
- , l1 = [235,544,2,45,5556,535,7,457]
- , o = {a: 123, b: 123, c:'sdf', l: l}
- , m = [124,124,'sdf1',l]
- async.map(l,valuePlus,c)
- function c(r){
- describe(r,'map()')
- .should.eql(l1)
-
- async.map(o,valuePlus,c)
- function c(r){
-
- describe(r,'map()')
- .should.eql(m)
-
- test.finish()
- }
- }
-}
-
-exports.each = function (test){
- var l = [234,543,1,44,5555,534,6,456]
- , o = {a: 123, b: 123, c:'sdf', l: l}
- , count = 0
- async.each(l,value,c)
- function c(){
- async.each(o,value,c)
- function c(){
-
- async.each(l,cnt,c)
- function c(){
-
- describe(count,"calls of each()").should.eql(8)
- count = 0
-
- async.each(o,cnt,c)
- function c(){
- describe(count,"calls of each()").should.eql(4)
-
- test.finish()
- }
- }
- }
- }
- function cnt(v,k,n){
- count ++
- n()
- }
-}
-
-exports.find = function (test){
- var l = [234,543,1,44,5555,'ffffffffffff',534,6,456]
- , o = {a: 123, b: 123, c:'sdf', l: l}
- async.find(l,isString,c)
- function c(r){
- describe(r,'find() string in ' + l).should.eql('ffffffffffff')
- async.find(o,isString,c)
- function c(r){
- describe(r,'find() string in ' + o).should.eql('sdf')
-
- test.finish()
- }
- }
- function isString (v,k,n,o){
- value(v,k,function(){},o)
- n ('string' == typeof v)
- }
-}
-
@@ -1,6 +1,6 @@
//test iterator.sync.expresso
-var sync = require('traverser/iterators').sync
+var sync = require('../iterators').sync
, test = require('assert')
/*
each
View
@@ -1,4 +1,4 @@
-var traverser = require('../traverser.sync')
+var traverser = require('../traverser')
, assert = require('assert')
exports ['calls search function with properties object'] = function(){
Oops, something went wrong.

0 comments on commit c20b956

Please sign in to comment.