1
0
Fork 0
forked from 0x2620/oxjs

use [].slice, not Ox.sub

This commit is contained in:
rolux 2012-05-24 11:02:59 +02:00
commit f990f3b857
7 changed files with 10 additions and 10 deletions

View file

@ -214,8 +214,8 @@ Ox.api = function(items, options) {
}
if (options.range) {
// apply range
result.data.items = Ox.sub(
result.data.items, options.range[0], options.range[1]
result.data.items = result.data.items.slice(
options.range[0], options.range[1]
);
}
}

View file

@ -314,7 +314,7 @@
}
};
}
Ox.forEach(Ox.sub(areas, 1), function(parts) {
Ox.forEach(areas.slice(1), function(parts) {
if (ret.length == 1 && parts.length == 1) {
ret = intersect(ret[0], parts[0]);
} else {
@ -383,7 +383,7 @@
});
return ret;
}
Ox.sub(areas, 1).forEach(function(area) {
areas.slice(1).forEach(function(area) {
var index, indices, intersections;
if (area.sw.lat < ret.sw.lat) {
ret.sw.lat = area.sw.lat;

View file

@ -280,7 +280,7 @@ Ox.doc = (function() {
}
});
function unwrap(str) {
return (isArray = /^\[.+\]$/.test(str)) ? Ox.sub(str, 1, -1) : str;
return (isArray = /^\[.+\]$/.test(str)) ? str.slice(1, -1) : str;
}
function wrap(str) {
return isArray ? '[' + str + 's' + ']' : str;