diff --git a/source/Ox/js/Array.js b/source/Ox/js/Array.js index 6be9157a..c7e383a7 100644 --- a/source/Ox/js/Array.js +++ b/source/Ox/js/Array.js @@ -2,6 +2,8 @@ /*@ Ox.api Turns an array into a list API + Ox.api takes an array and returns a function that allows you to + run complex queries against it. See the examples below for details. (items, options) -> List API items <[o]> An array of objects (key/value stores) options Options object @@ -215,7 +217,7 @@ Ox.api = function(items, options) { return match; } - return function(options) { + return function(options, callback) { var data, result = {data: {}, status: {code: 200, text: 'ok'}}, sort = {}; @@ -278,6 +280,7 @@ Ox.api = function(items, options) { ); } } + callback && callback(result); return result; };