mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Remove Base.iterator() functionality, since we don't need it in Paper.js
This commit is contained in:
parent
3b88bffff1
commit
10385267f9
1 changed files with 1 additions and 18 deletions
19
lib/bootstrap.js
vendored
19
lib/bootstrap.js
vendored
|
@ -196,27 +196,11 @@ var Base = new function() { // Bootstrap scope
|
|||
return dest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the argument to an iterator function. If none is specified, the
|
||||
* identity function is returned.
|
||||
* This supports normal functions, which are returned unmodified, and values
|
||||
* to compare to. Wherever this function is used in the Enumerable
|
||||
* functions, a value, a Function or null may be passed.
|
||||
*/
|
||||
function iterator(iter) {
|
||||
return !iter
|
||||
? function(val) { return val }
|
||||
: typeof iter !== 'function'
|
||||
? function(val) { return val == iter }
|
||||
: iter;
|
||||
}
|
||||
|
||||
function each(obj, iter, bind, asArray) {
|
||||
try {
|
||||
if (obj)
|
||||
(asArray || asArray === undefined && isArray(obj)
|
||||
? forEach : forIn).call(obj, iterator(iter),
|
||||
bind = bind || obj);
|
||||
? forEach : forIn).call(obj, iter, bind = bind || obj);
|
||||
} catch (e) {
|
||||
if (e !== Base.stop) throw e;
|
||||
}
|
||||
|
@ -324,7 +308,6 @@ var Base = new function() { // Bootstrap scope
|
|||
clone: clone,
|
||||
define: define,
|
||||
describe: describe,
|
||||
iterator: iterator,
|
||||
|
||||
// Base.create does something different from Object.create, it only
|
||||
// works on constructors and uses their prototype.
|
||||
|
|
Loading…
Reference in a new issue