mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-06-27 14:11:21 +02:00
23 lines
524 B
JavaScript
23 lines
524 B
JavaScript
/* */
|
|
var set = require("./$").set,
|
|
$at = require("./$.string-at")(true),
|
|
ITER = require("./$.uid").safe('iter'),
|
|
$iter = require("./$.iter"),
|
|
step = $iter.step;
|
|
require("./$.iter-define")(String, 'String', function(iterated) {
|
|
set(this, ITER, {
|
|
o: String(iterated),
|
|
i: 0
|
|
});
|
|
}, function() {
|
|
var iter = this[ITER],
|
|
O = iter.o,
|
|
index = iter.i,
|
|
point;
|
|
if (index >= O.length)
|
|
return step(1);
|
|
point = $at(O, index);
|
|
iter.i += point.length;
|
|
return step(0, point);
|
|
});
|