ee-rest-headers
Advanced tools
Comparing version
@@ -32,4 +32,5 @@ /** | ||
, select: function(items){ | ||
return new nodes.SelectStatement(this.strSep(items)); | ||
, select: function(first, remainder){ | ||
var node = new nodes.SelectStatement(this.flatten(first, remainder)); | ||
return node; | ||
} | ||
@@ -36,0 +37,0 @@ |
@@ -1,2 +0,3 @@ | ||
var Class = require('ee-class'); | ||
var Class = require('ee-class') | ||
, Types = require('ee-types'); | ||
@@ -16,2 +17,6 @@ var Collection = require('./Collection'); | ||
} | ||
, clone: function(){ | ||
return this.cloneAllAs(ArrayCollection); | ||
} | ||
}); |
@@ -1,2 +0,3 @@ | ||
var Class = require('ee-class'); | ||
var Class = require('ee-class') | ||
, Types = require('ee-types'); | ||
@@ -17,2 +18,6 @@ var Collection = require('./Collection'); | ||
} | ||
, clone: function(){ | ||
return this.cloneAllAs(Choice); | ||
} | ||
}); |
@@ -44,8 +44,12 @@ var Class = require('ee-class') | ||
, clone: function(){ | ||
return new Collection(this.map(function(item){ | ||
, cloneAllAs : function(theClass){ | ||
return new theClass(this.map(function(item){ | ||
if(Types.function(item.clone)) return item.clone(); | ||
return item; | ||
})); | ||
})) | ||
} | ||
, clone: function(){ | ||
return this.cloneAllAs(Collection); | ||
} | ||
}); |
var Class = require('ee-class') | ||
, Types = require('ee-types') | ||
, Collection = require('./Collection'); | ||
@@ -16,2 +17,6 @@ | ||
} | ||
, clone: function(){ | ||
return this.cloneAllAs(Sequence); | ||
} | ||
}); |
@@ -15,2 +15,6 @@ var Class = require('ee-class'), | ||
} | ||
, clone : function(){ | ||
return this.cloneAllAs(FilterStatement); | ||
} | ||
}); |
@@ -15,2 +15,6 @@ var Class = require('ee-class'), | ||
} | ||
, clone: function(){ | ||
return this.cloneAllAs(OrderStatement); | ||
} | ||
}); |
@@ -16,2 +16,6 @@ var Class = require('ee-class'), | ||
} | ||
, clone: function(){ | ||
return this.cloneAllAs(SelectStatement); | ||
} | ||
}); |
@@ -123,3 +123,3 @@ module.exports = (function() { | ||
peg$c79 = function(items) { return IR.arr(items); }, | ||
peg$c80 = function(s, r) { return IR.select(conc(s, r)); }, | ||
peg$c80 = function(s, r) { return IR.select(s, r); }, | ||
peg$c81 = function(s) { return IR.filter(s); }, | ||
@@ -126,0 +126,0 @@ peg$c82 = function(s, r) { return IR.choice(s, r); }, |
{ | ||
"name" : "ee-rest-headers" | ||
, "description" : "Middleware to parse and process custom rest headers" | ||
, "version" : "0.2.4" | ||
, "version" : "0.2.5" | ||
, "homepage" : "https://github.com/eventEmitter/ee-rest-headers" | ||
@@ -6,0 +6,0 @@ , "author" : "Michael Rüfenacht <ruefe@rcky.ch> (http://rcky.ch/)" |
@@ -171,2 +171,3 @@ var assert = require('assert') | ||
var node = parser.parse(', id, firstName, lastName, profile.id ,', 'select'); | ||
log(node); | ||
assert.equal('id', node[0].getName()); | ||
@@ -173,0 +174,0 @@ assert.equal('lastName', node[2].getName()); |
Sorry, the diff of this file is not supported yet
119644
0.61%3328
0.79%