VimŸUnDoåú‰ jDqø$ÏîM²3è8£å÷×E¿2À}>-C)�lB& var source = concat([3, 2, 1], boom):[[[[P�|J_ÐÿÿÿÿOÄí‚õ5�_ÐÿÿÿÿOÄí‰õfunct5�_Ð ÿÿÿÿOÄí¤õ function 5�_ÐÿÿÿÿOÄí¦õfunction generator()5�_ÐÿÿÿÿOÄí¦õfunction generator() {}5�_ÐÿÿÿÿOÄí§õ }5�_ÐÿÿÿÿOÄíµõfunction generator() {5�_Ð ÿÿÿÿOÄí¶õ5�_Ð ÿÿÿÿOÄí½õ õ5�_Ð ÿÿÿÿOÄíÌõ õ5�_Ð  ÿÿÿÿOÄíÔõ return {}5�_Ð ÿÿÿÿOÄíÖõ õ5�_Ð  ÿÿÿÿOÄíÛõ var deferred = defer()5�_Ð  ÿÿÿÿOÄíÜõ return {5�_ÐÿÿÿÿOÄíàõ return reducer(){5�_ÐÿÿÿÿOÄíâõ }5�_Ð ÿÿÿÿOÄíäõ reduce: 5�_ÐÿÿÿÿOÄíçõ return reducer({5�_ÐÿÿÿÿOÄíéõ return reducer(function()5�_ÐÿÿÿÿOÄíéõ return reducer(function() {}5�_ÐÿÿÿÿOÄíëõ reduce: fu5�_ÐÿÿÿÿOÄíëõ })5�_ÐÿÿÿÿOÄíðõ }5�_ÐÿÿÿÿOÄîõ5�_ÐÿÿÿÿOÄîõfunction generator() {5�_ÐÿÿÿÿOÄî õ return reducer(function() {5�_ÐÿÿÿÿOÄî!õ) return reducer(function(result, item) {5�_Ð"ÿÿÿÿOÄî1õ+ return reducible(function(result, item) {5�_Ð&ÿÿÿÿOÄî2õ) return reducible(function(next, item) {5�_Ð&ÿÿÿÿOÄîVõ õ5�_Ð ÿÿÿÿOÄîXõ reducible 5�_Ð! ÿÿÿÿOÄîZõ return reducible 5�_Ð "!ÿÿÿÿOÄî\õ return reduce()5�_Ð!#"ÿÿÿÿOÄîdõ return reduce()5�_Ð"$#ÿÿÿÿOÄîeõ return reduce(function())5�_Ð#%$(ÿÿÿÿOÄîhõ) return reduce(function(result, item))5�_Ð$&%*ÿÿÿÿOÄîhõ, return reduce(function(result, item) {})5�_Ð%'&ÿÿÿÿOÄîuõ5�_Ð&('ÿÿÿÿOÄîwõ })5�_Ð')(ÿÿÿÿOÄîõ õ5�_Ð(*)ÿÿÿÿOÄî‰õ var deferred = 5�_Ð)+*ÿÿÿÿOÄî�õ }, )5�_Ð*,+ÿÿÿÿOÄî˜õ5�_Ð+-,ÿÿÿÿOÄî™õ5�_Ð,.-ÿÿÿÿOÄîªõ }, deferred.promise)5�_Ð-/.ÿÿÿÿOÄî®õ5�_Ð.0/ÿÿÿÿOÄî¹õ 5�_Ð/10ÿÿÿÿOÄîÀõ f()5�_Ð021ÿÿÿÿOÄîÏõ* return reduce(function(result, item) {5�_Ð132ÿÿÿÿOÄîÏõ f()5�_Ð243ÿÿÿÿOÄîÐõ })5�_Ð354ÿÿÿÿOÄîÓõ õ5�_Ð465ÿÿÿÿOÄî×õ f()5�_Ð576ÿÿÿÿOÄîÛõ f(function())5�_Ð687ÿÿÿÿOÄîôõ f(function(next))5�_Ð798ÿÿÿÿOÄîöõ f(function(value))5�_Ð8:9ÿÿÿÿOÄîöõ f(function(value) {})5�_Ð9;:ÿÿÿÿOÄîùõ5�_Ð:<;ÿÿÿÿOÄîúõ  õ5�_Ð;=<ÿÿÿÿOÄïõ  var result = 5�_Ð<>=ÿÿÿÿOÄïõ 5�_Ð=?>ÿÿÿÿOÄï,õ result = 5�_Ð>@?ÿÿÿÿOÄï-õ  õ5�_Ð?A@ ÿÿÿÿOÄï0õ  if ()5�_Ð@BAÿÿÿÿOÄï2õ  var result = null5�_ÐACB ÿÿÿÿOÄï8õ  if (result)5�_ÐBDC ÿÿÿÿOÄï<õ  if (state.result)5�_ÐCED!ÿÿÿÿOÄï?õ " if ('value' in state.result)5�_ÐDFEÿÿÿÿOÄïBõ  if ('value' in state)5�_ÐEGFÿÿÿÿOÄïFõ  if ('value' in state) 5�_ÐFHGÿÿÿÿOÄïZõ  var state = {}5�_ÐGIHÿÿÿÿOÄïcõ  var state = { value: }5�_ÐHJIÿÿÿÿOÄïmõ  var result = state5�_ÐIKJÿÿÿÿOÄïpõ0 if ('value' in state) state.value = next()5�_ÐJLKÿÿÿÿOÄïqõ  õ5�_ÐKMLÿÿÿÿOÄïxõ  next()5�_ÐLNMÿÿÿÿOÄï‚õ  result = next()5�_ÐMONÿÿÿÿOÄïŽõ  f(function(value) {result = next(result, value)õ " result = next(result, value)5�_ÐNPOÿÿÿÿOÄï�õ4 f(function(value) { result = next(result, value)})õ })5�_ÐOQPÿÿÿÿOÄï–õ7 f(function(value) { result = next(result, value) })5�_ÐPRQ#ÿÿÿÿOÄï™õ% result = next(result, value) })5�_ÐQSRÿÿÿÿOÄïžõ  õ 5�_ÐRTS ÿÿÿÿOÄï õ  if ()5�_ÐSUTÿÿÿÿOÄï¥õ  if (end.is())5�_ÐTVU ÿÿÿÿOÄï¯õ  if (end.is(result))5�_ÐUWVÿÿÿÿOÄï¿õ  õ 5�_ÐVXWÿÿÿÿOÄïÔõ  deferred.resolve()5�_ÐWYX ÿÿÿÿOÄïÜõ  õ 5�_ÐXZY ÿÿÿÿOÄïùõ function bufferõ õ 5�_ÐY[ZÿÿÿÿOÄïýõ function buffer()5�_ÐZ\[ÿÿÿÿOÄïþõ function buffer() {}5�_Ð[]\ÿÿÿÿOÄïÿõ õ5�_Ð\^]ÿÿÿÿOÄðõ return reducible()5�_Ð]_^ÿÿÿÿOÄðõ return reducible(function())5�_Ð^`_ÿÿÿÿOÄðõ return reducible(function() )5�_Ð_a` ÿÿÿÿOÄðõ return {}5�_Ð`baÿÿÿÿOÄðõ õ5�_ÐacbÿÿÿÿOÄðõ reduce: function()5�_ÐbdcÿÿÿÿOÄðõ reduce: function() {}5�_ÐcedÿÿÿÿOÄðõ enqueue: functionõ }5�_ÐdfeÿÿÿÿOÄð$õ enqueue: function()5�_ÐegfÿÿÿÿOÄð%õ enqueue: function() {}5�_ÐfhgÿÿÿÿVOÐÇ.õÝõfunction generator(f) {õ* return reducible(function(next, start) { var deferred = defer() var result = start f(function(value) {" result = next(result, value) if (reduced.is(result))$ deferred.resolve(result.value) }) return deferred.promise })}function buffer() { return { reduce: function() { }, enqueue: function() { } }}5�_Ðgih:ÿÿÿÿØ:vOÐÇ~õ9;>if (module == require.main)õ9;Ý +exports['test filter'] = function(assert) { var called = 0 var source = [ 1, 2, 3 ]/ var actual = reducers.filter(function(item) { called = called + 1 return item % 2 }, source)L assert.equal(called, 0, 'filter does not invokes until result is reduced')J assert.deepEqual(reducers.into(actual), [ 1, 3 ], 'items were filtered'): assert.equal(called, 3, 'filterer called once per item')})exports['test take'] = function(assert) { var called = 0 var source = [ 1, 2, 3, 4 ]- var actual = reducers.take(function(item) { called = called + 1 return item <= 2 }, source)J assert.equal(called, 0, 'take does not invokes until result is reduced')G assert.deepEqual(reducers.into(actual), [ 1, 2 ], 'items were taken')@ assert.equal(called, 3, 'taker called until it returns false')H assert.deepEqual(reducers.into(actual), [ 1, 2 ], 'can be re-reduced')}.exports['test take none'] = function(assert) { var called = 0 var source = [ 1, 2, 3, 4 ]- var actual = reducers.take(function(item) { called = called + 1 return false }, source)J assert.equal(called, 0, 'take does not invokes until result is reduced')C assert.deepEqual(reducers.into(actual), [], '0 items were taken'). assert.equal(called, 1, 'taker called once')}-exports['test take all'] = function(assert) { var called = 0 var source = [ 1, 2, 3 ]- var actual = reducers.take(function(item) { called = called + 1 return true }, source)J assert.equal(called, 0, 'take does not invokes until result is reduced')N assert.deepEqual(reducers.into(actual), [ 1, 2, 3 ], 'all items were taken')6 assert.equal(called, 3, 'taker called on each item')})exports['test pick'] = function(assert) {/ var actual = reducers.pick(2, [ 1, 2, 3, 4 ])G assert.deepEqual(reducers.into(actual), [ 1, 2 ], 'picked two items')M assert.deepEqual(reducers.into(actual), [ 1, 2 ], 'can be re-reduced same')}.exports['test pick none'] = function(assert) {/ var actual = reducers.pick(0, [ 1, 2, 3, 4 ])@ assert.deepEqual(reducers.into(actual), [], 'picks none on 0')}-exports['test pick all'] = function(assert) {1 var actual = reducers.pick(100, [ 1, 2, 3, 4 ])9 assert.deepEqual(reducers.into(actual), [ 1, 2, 3, 4 ],: 'picks all if has less than requested')})exports['test drop'] = function(assert) { var called = 0 var source = [ 1, 2, 3, 4 ]- var actual = reducers.drop(function(item) { called = called + 1 return item <= 2 }, source)J assert.equal(called, 0, 'drop does not invokes until result is reduced')I assert.deepEqual(reducers.into(actual), [ 3, 4 ], 'items were dropped')? assert.equal(called, 3, 'drop called until it returns false')H assert.deepEqual(reducers.into(actual), [ 3, 4 ], 'can be re-reduced')}.exports['test drop none'] = function(assert) { var called = 0 var source = [ 1, 2, 3 ]- var actual = reducers.drop(function(item) { called = called + 1 return false }, source)J assert.equal(called, 0, 'drop does not invokes until result is reduced')N assert.deepEqual(reducers.into(actual), [ 1, 2, 3 ], '0 items were dropped')5 assert.equal(called, 1, 'dropper called only once')}-exports['test drop all'] = function(assert) { var called = 0 var source = [ 1, 2, 3 ]- var actual = reducers.drop(function(item) { called = called + 1 return true }, source)J assert.equal(called, 0, 'drop does not invokes until result is reduced')G assert.deepEqual(reducers.into(actual), [], 'all items were dropped')8 assert.equal(called, 3, 'dropper called on each item')})exports['test skip'] = function(assert) {/ var actual = reducers.skip(2, [ 1, 2, 3, 4 ])H assert.deepEqual(reducers.into(actual), [ 3, 4 ], 'skipped two items')M assert.deepEqual(reducers.into(actual), [ 3, 4 ], 'can be re-reduced same')}.exports['test skip none'] = function(assert) {/ var actual = reducers.skip(0, [ 1, 2, 3, 4 ])L assert.deepEqual(reducers.into(actual), [ 1, 2, 3, 4 ], 'skips none on 0')}-exports['test skip all'] = function(assert) {1 var actual = reducers.skip(100, [ 1, 2, 3, 4 ])- assert.deepEqual(reducers.into(actual), [],: 'skips all if has less than requested')},exports['test flatten'] = function(assert) {/ var source = [ [ 1 ], [ 2, 3 ], [ 4, 5, 6 ] ]' var actual = reducers.flatten(source)) assert.deepEqual(reducers.into(actual),( [ 1, 2, 3, 4, 5, 6 ],& 'flatten reducers')) assert.deepEqual(reducers.into(actual),( [ 1, 2, 3, 4, 5, 6 ],' 'can be re-reduced')< assert.deepEqual(source, [ [ 1 ], [ 2, 3 ], [ 4, 5, 6 ] ],, 'no changes to a source')}+exports['test append'] = function(assert) {< var actual = reducers.append([ 1 ], [ 2, 3 ], [ 4, 5, 6 ])) assert.deepEqual(reducers.into(actual),( [ 1, 2, 3, 4, 5, 6 ],* 'reducers were joined')) assert.deepEqual(reducers.into(actual),( [ 1, 2, 3, 4, 5, 6 ],' 'can be re-reduced')}if (module == require.main)5�_Ðhjiÿÿÿÿ,vOÐÇŽõ.(exports['test map'] = function(assert) {õ>)exports['test into'] = function(assert) { var source = [ 1, 2, 3 ]6 assert.deepEqual(reducers.into(source), [ 1, 2, 3 ],' 'returns identical')0 assert.notEqual(reducers.into(source), source,& 'but different one')}0exports['test into buffer'] = function(assert) { var buffer = [ 0 ]: assert.equal(reducers.into([ 1, 2, 3 ], buffer), buffer,1 'reduces into buffer if provided')* assert.deepEqual(buffer, [ 0, 1, 2, 3 ],; 'pre-existing items in buffer are kept')}(exports['test map'] = function(assert) {5�_Ðikj!ÿÿÿÿvOÐÇ“õ.!var reducers = require('../core')5�_Ðjlk!ÿÿÿÿvOÐÇœõ "/, var actual = reducers.map(function(item) {5�_Ðkml ÿÿÿÿvOÐǤõ/"var reducers = require('../core'),5�_ÐlnmÿÿÿÿvOÐǧõ/ map = reducers.map5�_ÐmonÿÿÿÿvOÐǨõ/ map = $.map5�_ÐnpoÿÿÿÿvOÐǶõ/ map = $.map, into = $.map5�_Ðoqp'ÿÿÿÿvOÐǹõ&(/N assert.deepEqual(reducers.into(actual), [ 11, 12, 13 ], 'values are mapped')5�_Ðprq,ÿÿÿÿvOÐÉßõ+-/ require('test').run(exports);5�_ÐqsrÿÿÿÿvOôböõ 'use strict';õ/2;(function(id, factory) { // Module boilerplate :(3 if (typeof(define) === 'function') { // RequireJS define(factory);: } else if (typeof(require) === 'function') { // CommonJS1 factory.call(this, require, exports, module);= } else if (~String(this).indexOf('BackstagePass')) { // JSM# factory(function require(uri) { var imports = {}; Cu.import(uri, imports); return imports;' }, this, { uri: __URI__, id: id });. this.EXPORTED_SYMBOLS = Object.keys(this); } else { // Browser or alike var globals = this" factory(function require(id) { return globals[id];O }, (globals[id] = {}), { uri: document.location.href + '#' + id, id: id }); }<}).call(this, 'loader', function(require, exports, module) { 'use strict';5�_ÐrtsÿÿÿÿvOôbùõ1/*global define: true, Cu: true, __URI__: true */5�_Ðsut$ÿÿÿÿvOôbû õ& forin: true latedef: false */5�_Ðtvu6ÿÿÿÿvOôc õ5�_Ðuwv ÿÿÿÿvOôc  õ # var actual = map(function(item) {5�_Ðvxw ÿÿÿÿvOôc õ }, source)5�_ÐwyxÿÿÿÿvOôc#õ5�_ÐxzyÿÿÿÿvOôc#õ});5�_Ðy{zÿÿÿÿvOôc$õ5�_Ðz|{ÿÿÿÿvOôf[õ })5�_Ð{}| ÿÿÿÿvOôf_õ }, source)5�_Ð|~}ÿÿÿÿP üzõvar $ = require('../core'),5�_Ð}~ÿÿÿÿP ü}õvar map = require('../core'),5�_Ð~€ÿÿÿÿP ü~õ õ 5�_Ð�€ÿÿÿÿP ü„õ var into = require()5�_Ѐ‚�ÿÿÿÿP ü„õ var into = require('')5�_Ð�ƒ‚$ÿÿÿÿP ü‡õ $var into = require('../accumulator')5�_Ђ„ƒ ÿÿÿÿP ü‰õ  map = $.map, into = $.into5�_Ѓ…„ÿÿÿÿPƒ�õ 'use strict';5�_Є†… ÿÿÿÿPƒ�õ "use strict';5�_Ð…‡† ÿÿÿÿPƒ�õ var map = require('../core').map5�_Іˆ‡ÿÿÿÿPƒ�õvar map = require('../core')5�_Ї‰ˆÿÿÿÿPƒ�õvar map = require('../map')5�_Ј‹‰ÿÿÿÿPƒ�õvar map = require('../map")5�_ЉŒŠ‹ÿÿÿÿPƒ�õ )var into = require('../accumulator').into5�_Ћ�Œ"ÿÿÿÿPƒ� õ )var into = require("../accumulator').into5�_ÐŒŽ�"ÿÿÿÿPƒ�#õ "var into = require("../into').into5�_Ð��Ž ÿÿÿÿPƒ�'õ (exports['test map'] = function(assert) {5�_ÐŽ�� ÿÿÿÿPƒ�(õ (exports["test map'] = function(assert) {5�_Ð�‘�ÿÿÿÿPƒ�,õI assert.equal(called, 0, 'map does not invokes until result is reduced')5�_Ð�’‘GÿÿÿÿPƒ�.õI assert.equal(called, 0, "map does not invokes until result is reduced')5�_Б“’CÿÿÿÿPƒ�/õE assert.deepEqual(into(actual), [ 11, 12, 13 ], 'values are mapped')5�_Ð’•“1ÿÿÿÿPƒ�0õE assert.deepEqual(into(actual), [ 11, 12, 13 ], 'values are mapped")5�_Г–”•1ÿÿÿÿPƒ�3õ8 assert.equal(called, 3, 'mapper called once per item')5�_Е—–6ÿÿÿÿPƒ�5õ8 assert.equal(called, 3, 'mapper called once per item')5�_Ж˜—ÿÿÿÿPƒ�6õ8 assert.equal(called, 3, 'mapper called once per item")5�_З™˜ ÿÿÿÿPƒ�9õ require('test').run(exports)5�_Иš™ÿÿÿÿPƒ�<õ require("test').run(exports)5�_Й›šÿÿÿÿPˆ‹9õ'/* vim:set ts=2 sw=2 sts=2 expandtab */5�_Кœ›ÿÿÿÿPˆ‹9õM/*jshint asi: true undef: true es5: true node: true browser: true devel: true5�_Л�œ ÿÿÿÿPˆ‹9õ9 forin: true latedef: false globalstrict: true */5�_Мž�ÿÿÿÿPˆ‹:õ5�_Ð�ŸžÿÿÿÿvPˆÜáõ!õ5�_О ŸÿÿÿÿvPˆÜäõ var source = [ 1, 2, 3 ]5�_П¤ ÿÿÿÿvPˆÜçõ!+ var actual = map(source, function(item) {5�_Р¥¡¤ÿÿÿÿvPˆÝ7õ!% var actual = map(, function(item) {5�_Ф¦¥-ÿÿÿÿvPˆÝ>õ!E assert.deepEqual(into(actual), [ 11, 12, 13 ], "values are mapped")5�_Ð¥§¦5ÿÿÿÿvPˆÝDõ!= assert.deepEqual(into(actual), [ 17 ], "values are mapped")5�_Ц¨§ÿÿÿÿvPˆÝHõ!8 assert.equal(called, 3, "mapper called once per item")5�_Ч©¨ÿÿÿÿvPˆÝaõ!(exports["test map"] = function(assert) {5�_Шª©ÿÿÿÿvPˆÝdõ!(exports["test map"] = function(assert) {5�_Щ¬ªÿÿÿÿPŠôõi"õ !5�_Ъ­«¬ÿÿÿÿPŠôõk5�_Ь®­ ÿÿÿÿPŠôõk5�_Э°®ÿÿÿÿPŠôõl5�_Ю±¯°%ÿÿÿÿPŠô%õhj/ and.error(boom).then(complete)õ]_7 expect(actual).to.be('a3', 'b2', 'c1').then(complete)õTVI expect(actual).to.have.items(9, 4, 1).and.an.error(boom).then(complete)õLN ).then(complete)õ@B4 expect(actual).to.be(6, 5, 4, 3, 2).then(complete)õ:<= expect(actual).to.be('1a', '2b', '3c', '4d').then(complete)õ241 expect(actual).to.be(2, 4, 6, 8).then(complete)õ,.- expect(actual).to.be.empty().then(complete)õ$&- expect(actual).to.be.empty().then(complete)5�_а²±$ÿÿÿÿPŠô*õ*,) }, Stream.empty, Stream.of(1, 2, 3, 4))õ#% }, Stream.empty)5�_б³²+ÿÿÿÿPŠô0õceM delay(append(Stream.of(3, 2, 1), Stream.error(boom))),õ[]O }, Stream.from('abc'), delay(append(Stream.of(3, 2, 1), Stream.error(boom))))õQS= var source = append(Stream.of(3, 2, 1), Stream.error(boom))õDF> var actual = map.all(Array, delay(Stream.of(5, 4, 3, 2, 1)),õ>@. var source = delay(Stream.of(5, 4, 3, 2, 1))õ8:0 }, Stream.of(1, 2, 3, 4), Stream.from('abcd'))õ02% var numbers = Stream.of(1, 2, 3, 4)õ*, }, [], Stream.of(1, 2, 3, 4))5�_в´³RÿÿÿÿPŠô;õceE delay(append([3, 2, 1)], Stream.error(boom))),õ[]G }, Stream.from('abc'), delay(append([3, 2, 1)], Stream.error(boom))))õQS5 var source = append([3, 2, 1)], Stream.error(boom))5�_гµ´9ÿÿÿÿPŠôJõdf+ Stream.from('abcd'))õceE delay(concat([3, 2, 1)], Stream.error(boom))),õ[]G }, Stream.from('abc'), delay(concat([3, 2, 1)], Stream.error(boom))))õQS5 var source = concat([3, 2, 1)], Stream.error(boom))õEGA Stream.from('abcde'), Stream.from('~@!#'))õ8:( }, [1, 2, 3, 4)], Stream.from('abcd'))5�_д¶µ!ÿÿÿÿPŠômõ`bGexports['test map.all with early error'] = function(expect, complete) {õWYFexports['test map.all with late error'] = function(expect, complete) {õOQ@exports['test map broken stream'] = function(expect, complete) {õCEJexports['test map.all sync & async stream'] = function(expect, complete) {õ=?Dexports['test map with async stream'] = function(expect, complete) {õ57Jexports['test map.all same length streams'] = function(expect, complete) {õ/19exports['test number map'] = function(expect, complete) {õ')Aexports['test map.all with empty'] = function(expect, complete) {õ "8exports['test map empty'] = function(expect, complete) {5�_е·¶ÿÿÿÿPŠô–õik}õ^`}õUW}õMO}õAC}õ;=}õ35}õ-/}õ%'}õ }õ}5�_ж¸·ÿÿÿÿPŠô¢õm})5�_з¹¸ÿÿÿÿPŠô£õ m})5�_иº¹#ÿÿÿÿPŠôµõ"$m+ expect.test.fail('map fn was executed')5�_й»º$ÿÿÿÿPŠô·õ%' assertõ$'n õ$&m5�_к¼»" ÿÿÿÿPŠô½õ"$p õ"$o5�_л½¼$ÿÿÿÿPŠôÁõ"$p throw Error'map fn was executed')õ#%p& assert.fail('map fn was executed')5�_м¾½& ÿÿÿÿPŠôÄõ%'o assert()5�_н¿¾&ÿÿÿÿPŠôÈõ%'o assert(actual, [])5�_оÀ¿&ÿÿÿÿPŠôÊõ%'o assert(actual, [], "")5�_пÁÀ'ÿÿÿÿPŠôÐõ&' expect(actual).to.be.empty()5�_ÐÀÂÁ!ÿÿÿÿPŠôÙõhjC expect(actual).to.have.items([ 3, 'a' ], [ 2, 'b' ], [ 1, 'c' ]).õeg$ from('abcd'))õbd var boom = Error('Boom!!')õacBexports['test map.all with early error'] = test(function(assert) {õ^`( expect(actual).to.be('a3', 'b2', 'c1')õ\^9 }, from('abc'), delay(concat([3, 2, 1)], error(boom))))õY[ var boom = Error('boom')õXZAexports['test map.all with late error'] = test(function(assert) {õQS var boom = Error('Boom!')õPR;exports['test map broken stream'] = test(function(assert) {õLN [ 2, 'd', '#' ]õKM [ 3, 'c', '!' ],õJL [ 4, 'b', '@' ],õIK [ 5, 'a', '~' ],õFH3 from('abcde'), from('~@!#'))õDFEexports['test map.all sync & async stream'] = test(function(assert) {õ>@?exports['test map with async stream'] = test(function(assert) {õ;=. expect(actual).to.be('1a', '2b', '3c', '4d')õ9;! }, [1, 2, 3, 4)], from('abcd'))õ68Eexports['test map.all same length streams'] = test(function(assert) {õ024exports['test number map'] = test(function(assert) {õ(* ÿÿÿÿ99vPŠõ²õ=?W assert()5�_Ðäæå< ÿÿÿÿ99vPŠõ¸õ;=W? var actual = map(function(x) { return x * x }, delay(source))5�_Ðåçæ< ÿÿÿÿ99vPŠõºõ<>X õ<>W5�_Ðæèç=ÿÿÿÿ99vPŠõÁõ<>X var actual = capture()5�_Ðçéè=)ÿÿÿÿ99vPŠõÄõ<>X* var actual = capture(mapped, function())5�_Ðèêé=+ÿÿÿÿ99vPŠõÄõ<>X- var actual = capture(mapped, function() {})5�_Ðéëê=(ÿÿÿÿ99vPŠõÊõ<>XC var actual = capture(mapped, function() { return error.message })5�_Ðêìë?ÿÿÿÿ99vPŠõÐõ>@X assert(actual, )5�_Ðëíì?ÿÿÿÿ99vPŠõÑõ>@X assert(actual, [])5�_Ðìîí?ÿÿÿÿ99vPŠõÕõ>@X assert(actual, [9, 4, 1])5�_Ðíïî?(ÿÿÿÿ99vPŠõÜõ>@X) assert(actual, [9, 4, 1, boom.message])5�_Ðîðï?+ÿÿÿÿ99vPŠõÝõ>@X- assert(actual, [9, 4, 1, boom.message], "")5�_Ðïñð@ÿÿÿÿ99vPŠõâ%õ?@: expect(actual).to.have.items(9, 4, 1).and.an.error(boom)5�_Ððòñ<1ÿÿÿÿ<=<1v1PŠõëõ;=W? var mapped = map(function(x) { return x * x }, delay(source))5�_Ðñóò<1ÿÿÿÿ<=<1v1PŠõìõ;=W2 var mapped = map(function(x) { return x * x }, )5�_Ðòôó<ÿÿÿÿ<=<1v1PŠõî&õ;=W0 var mapped = map(function(x) { return x * x })5�_Ðóõôÿÿÿÿ<=<1v1PŠõóõXõW5�_Ðôöõÿÿÿÿ===1v1PŠõúõXvar capture = require()5�_Ðõ÷öÿÿÿÿ===1v1PŠõú'õXvar capture = require("")5�_Ðöø÷CÿÿÿÿCVvPŠö (õBDDif (module == require.main)õBDXAexports["test map.all with late error"] = test(function(assert) { var boom = Error("boom")' var actual = map.all(function(a, b) { return a + b9 }, from("abc"), delay(concat([3, 2, 1)], error(boom))))$ assert(actual, ["a3", "b2", "c1"])})Bexports["test map.all with early error"] = test(function(assert) { var boom = Error("Boom!!") var actual = map.all(Array,> delay(concat([3, 2, 1)], error(boom))),$ from("abcd"))C expect(actual).to.have.items([ 3, "a" ], [ 2, "b" ], [ 1, "c" ]). and.error(boom)})if (module == require.main)5�_Ð÷ùø%ÿÿÿÿCCvPŠöõ$&D& var actual = map(function(element) {5�_Ðøúù'ÿÿÿÿCCvPŠö!õ&(D }, [])5�_Ðùûú'ÿÿÿÿCCvPŠö")õ&(D },)5�_ÐúüûCÿÿÿÿCC v PŠö%õBDDif (module == require.main)5�_ÐûýüCÿÿÿÿCC v PŠö&õBDDif ( == require.main)5�_ÐüþýCÿÿÿÿCC v PŠö(*õBDDif (require.main)5�_ÐýÿþÿÿÿÿP‹”’+õvar error = require("../error")5�_Ðþÿ;'ÿÿÿÿP‹”•õ:<C- var source = concat([3, 2, 1], error(boom))5�_Ðÿ;'ÿÿÿÿP‹”–,õ:<C' var source = concat([3, 2, 1], boom))5�_Ð#ÿÿÿÿP�VŸõ#%D õ#%C5�_Ð%ÿÿÿÿP�V¤õ%'E õ%'D5�_Ð&ÿÿÿÿP�V©õ&(F õ&(E5�_Ð'ÿÿÿÿP�V«õ&(F ret5�_Ð(ÿÿÿÿP�V®-õ'(& throw Error("map fn was executed")5�_Ð#!ÿÿÿÿP�V´õ"$E3exports["test map empty"] = test(function(assert) {5�_Ð+ÿÿÿÿP�V·õ*,E})5�_Ð *ÿÿÿÿP�V¸õ)+E. assert(actual, [], "mapping empty is empty")5�_Ð  *ÿÿÿÿP�V¼õ*,F õ*,E5�_Ð   +ÿÿÿÿP�VÁõ*,F assert.equal()5�_Ð   +ÿÿÿÿP�VÃ.õ*,F assert.equal(called, 0, "")5�_Ð   -ÿÿÿÿ#,vP�VÐõ-8Gõ-/F5�_Ð  .ÿÿÿÿ#,vP�VÔõ-/P.exports["test map empty"] = function(assert) {5�_Ð 0ÿÿÿÿ#,vP�VÙõ/1P* var actual = map([], function(element) {5�_Ð0ÿÿÿÿ#,vP�VÚõ/1P) var actual = map(), function(element) {5�_Ð0ÿÿÿÿ#,vP�VÜõ/1P/ var actual = map(void()), function(element) {5�_Ð0ÿÿÿÿ#,vP�VÝ/õ/1P0 var actual = map(void(0)), function(element) {5�_Ð5-ÿÿÿÿ#,vP�Váõ46P8 assert.deepEqual(actual, [], "mapping empty is empty")5�_Ð5ÿÿÿÿ#,vP�Vþõ46P7 assert.deepEqual(actual, [], "mapping void is empty")5�_Ð5ÿÿÿÿ#,vP�Wõ46P< assert.deepEqual(into(actual, [], "mapping void is empty")5�_Ð5;ÿÿÿÿ#,vP�W0õ46P= assert.deepEqual(into(actual), [], "mapping void is empty")5�_Ð8ÿÿÿÿ7.vP�Wõ8CQõ8:P5�_ÐBÿÿÿÿ7.vP�WõBDZ5�_Ð9ÿÿÿÿ99vP�W1õ8:[-exports["test map void"] = function(assert) {5�_Ð;ÿÿÿÿ99vP�W2õ:<[/ var actual = map(void(0), function(element) {5�_Ð@2ÿÿÿÿ99vP�W!3õ?A[G assert.deepEqual(into(actual), [], "mapping void is identical of []")5�_ÐBÿÿÿÿB9vP�W'õCN]õBE\õBD[5�_ÐDÿÿÿÿB9vP�W+õCEf-exports["test map null"] = function(assert) {5�_ÐFÿÿÿÿB9vP�W.õEGf, var actual = map(null, function(element) {5�_ÐK2ÿÿÿÿB9vP�W4õJLfG assert.deepEqual(into(actual), [], "mapping null is identical of []")5�_Ð KGÿÿÿÿB9vP�W9õJLfI assert.deepEqual(into(actual), [], "mapping number is identical of []")5�_Ð! KDÿÿÿÿB9vP�WGõJLfV assert.deepEqual(into(actual), [], "mapping number is identical of calling f on it")5�_Ð "!K7ÿÿÿÿB9vP�WIõJLfI assert.deepEqual(into(actual), [], "mapping number is calling f on it")5�_Ð!#"K%ÿÿÿÿB9vP�WZõJMfQ assert.deepEqual(into(actual), [], "mapping number is same as calling f on it")5�_Ð"$#L*ÿÿÿÿB9vP�W_õKMg? "mapping number is same as calling f on it")5�_Ð#%$LVÿÿÿÿB9vP�WgõKMgX "mapping number is identical of mapping sequence as calling f on it")5�_Ð$&%LRÿÿÿÿB9vP�Wm4õKMgT "mapping number is identical of mapping sequence of that number")5�_Ð%'&K"ÿÿÿÿB9vP�WrõJLg$ assert.deepEqual(into(actual), [],5�_Ð&('MÿÿÿÿB9vP�Wy5õLNg; assert.equal(called, 0, "mapping function is not called")5�_Ð')(M9ÿÿÿÿB9vP�W{6õLNg; assert.equal(called, 1, "mapping function is not called")5�_Ð(*)OÿÿÿÿNDvP�W†õO[hõOQg5�_Ð)+*ZÿÿÿÿNDvP�W‡õZ\r5�_Ð*,+PÿÿÿÿNDvP�WŠõOQs/exports["test map number"] = function(assert) {5�_Ð+-,PÿÿÿÿNDvP�WŒ7õOQs/exports["test map strict"] = function(assert) {5�_Ð,.-RÿÿÿÿNDvP�W•õQSs) var actual = map(7, function(element) {5�_Ð-/.RÿÿÿÿNDvP�W–õQSs* var actual = map("", function(element) {5�_Ð.0/RÿÿÿÿNDvP�W—õQSs0 var actual = map("hello ", function(element) {5�_Ð/10HÿÿÿÿNDvP�W¡õGIs return called5�_Ð021F&ÿÿÿÿNDvP�W¥õEGs) var actual = map(7, function(element) {5�_Ð132HÿÿÿÿNDvP�W§õGIs return element5�_Ð243TÿÿÿÿNDvP�W­õSUs return called5�_Ð354R,ÿÿÿÿNDvP�W±õQSs/ var actual = map("hello", function(element) {5�_Ð465T ÿÿÿÿNDvP�W³õSUs return 5�_Ð576TÿÿÿÿNDvP�W·8õSUs return $ + ""5�_Ð687W#ÿÿÿÿNDvP�W»õVXs% assert.deepEqual(into(actual), [8],5�_Ð798W#ÿÿÿÿNDvP�W¼9õVXs& assert.deepEqual(into(actual), [""],5�_Ð8:9X"ÿÿÿÿNDvP�WÁ:õWYsK "mapping number is identical of mapping sequence of it")5�_Ð9;:\"ÿÿÿÿNDvP�WÙõ[]s4exports["test number map"] = test(function(assert) {5�_Ð:<;aÿÿÿÿNDvP�WÛ;õ`bs})5�_Ð;=<` ÿÿÿÿNDvP�Wßõ_as5 assert(actual, [2, 4, 6, 8], "numbers are doubled")5�_Ð<>=`ÿÿÿÿNDvP�Wá<õ_as: assert(into(actual, [2, 4, 6, 8], "numbers are doubled")5�_Ð=?>bÿÿÿÿNDvP�Wèõbdtõbds5�_Ð>@?qÿÿÿÿNDvP�Wí=õqsuõqst5�_Ð?A@*ÿÿÿÿNDvP�Xõ)+u8 assert.deepEqual(actual, [], "mapping empty is empty")5�_Ð@BA*ÿÿÿÿNDvP�X>õ)+u= assert.deepEqual(into(actual, [], "mapping empty is empty")5�_ÐACB`ÿÿÿÿNDvP�X6?õ_au; assert(into(actual), [2, 4, 6, 8], "numbers are doubled")5�_ÐBDCcÿÿÿÿNDvP�hŸõbc/*5�_ÐCEDhÿÿÿÿNDvP�h¡@õhjuõhjt5�_ÐDFEiÿÿÿÿNDvP�wŠõhi/*5�_ÐEGFqÿÿÿÿNDvP�w‹Aõpq*/5�_ÐFHGmÿÿÿÿNDvP�wœBõlmH var actual = capture(mapped, function(error) { return error.message })5�_ÐGIHl ÿÿÿÿNDvP�w Cõkmr? var mapped = map(delay(source), function(x) { return x * x })5�_ÐHJIn'ÿÿÿÿNDvP�xÐDõmor= assert(actual, [9, 4, 1, boom.message], "errors propagate")5�_ÐIKJnÿÿÿÿNDvP�y7õmor5 assert(actual, [9, 4, 1, boom], "errors propagate")5�_ÐJLKnÿÿÿÿNDvP�y8õmor7 assert(actual, {}[9, 4, 1, boom], "errors propagate")5�_ÐKMLnÿÿÿÿNDvP�y=õmor7 assert(actual, [][9, 4, 1, boom], "errors propagate")5�_ÐLNMnÿÿÿÿNDvP�y@õmor6 assert(actual, [[9, 4, 1, boom], "errors propagate")5�_ÐMONnÿÿÿÿNDvP�yCõmor7 assert(actual, {}[9, 4, 1, boom], "errors propagate")5�_ÐNPOnÿÿÿÿNDvP�yHõmor8 assert(actual, {$:[9, 4, 1, boom], "errors propagate")5�_ÐOQPn*ÿÿÿÿNDvP�yPEõmor@ assert(actual, {$:[9, 4, 1], error: boom], "errors propagate")5�_ÐPRQnÿÿÿÿNDvP�yYõmor@ assert(actual, {$:[9, 4, 1], error: boom}, "errors propagate")5�_ÐQSRn*ÿÿÿÿNDvP�y^GõmorD assert(actual, {value:[9, 4, 1], error: boom}, "errors propagate")5�_ÐRTSnÿÿÿÿNDvP�y¶õmorC assert(actual, {value:[9, 4, 1], error:boom}, "errors propagate")5�_ÐSUTnÿÿÿÿNDvP�y·õmorD assert(actual, { value:[9, 4, 1], error:boom}, "errors propagate")5�_ÐTVUn+ÿÿÿÿNDvP�yºõmorE assert(actual, { value: [9, 4, 1], error:boom}, "errors propagate")5�_ÐUWVn0ÿÿÿÿNDvP�y»HõmorF assert(actual, { value: [9, 4, 1], error: boom}, "errors propagate")5�_ÐVXW#ÿÿÿÿ#Zv P�p,õr "use strict";!var test = require("./util/test")var delay = require("../delay")!var concat = require("../concat")#var capture = require("../capture")var map = require("../map")var into = require("../into")1exports["test map sequence"] = function(assert) { var called = 0 var source = [ 1, 2, 3 ]+ var actual = map(source, function(item) { called = called + 1 return item + 10 })I assert.equal(called, 0, "map does not invokes until result is reduced")E assert.deepEqual(into(actual), [ 11, 12, 13 ], "values are mapped")8 assert.equal(called, 3, "mapper called once per item")}.exports["test map value"] = function(assert) { var called = 0& var actual = map(7, function(item) { called = called + 1 return item + 10 })I assert.equal(called, 0, "map does not invokes until result is reduced")< assert.deepEqual(into(actual), [ 17 ], "values is mapped")8 assert.equal(called, 1, "mapper called once per item")}.exports["test map empty"] = function(assert) { var called = 0* var actual = map([], function(element) { called = called + 1 return called })> assert.deepEqual(into(actual), [], "mapping empty is empty"); assert.equal(called, 0, "mapping function is not called")}-exports["test map void"] = function(assert) { var called = 0/ var actual = map(void(0), function(element) { called = called + 1 return called })G assert.deepEqual(into(actual), [], "mapping void is identical of []"); assert.equal(called, 0, "mapping function is not called")}-exports["test map null"] = function(assert) { var called = 0, var actual = map(null, function(element) { called = called + 1 return called })G assert.deepEqual(into(actual), [], "mapping null is identical of []"); assert.equal(called, 0, "mapping function is not called")}/exports["test map number"] = function(assert) { var called = 0# var actual = map(7, function(x) { called = called + 1 return x + 1 })% assert.deepEqual(into(actual), [8],K "mapping number is identical of mapping sequence of it")< assert.equal(called, 1, "mapping function is called once")}/exports["test map string"] = function(assert) { var called = 0) var actual = map("hello", function($) { called = called + 1 return $ + " world" })1 assert.deepEqual(into(actual), ["hello world"],K "mapping string is identical of mapping sequence of it")< assert.equal(called, 1, "mapping function is called once")}/exports["test number map"] = function(assert) { var numbers = [1, 2, 3, 4]C var actual = map(numbers, function(number) { return number * 2 })E assert.deepEqual(into(actual), [2, 4, 6, 8], "numbers are doubled")}?exports["test map with async stream"] = test(function(assert) {% var source = delay([5, 4, 3, 2, 1])8 var actual = map(source, function(x) { return x + 1 })G assert(actual, [6, 5, 4, 3, 2], "async number stream is incermented")});exports["test map broken stream"] = test(function(assert) { var boom = Error("Boom!")& var source = concat([3, 2, 1], boom)? var actual = map(delay(source), function(x) { return x * x })G assert(actual, { value: [9, 4, 1], error: boom }, "errors propagate")})if (require.main === module) require("test").run(exports)5�_ÐWYXÿÿÿÿ#Zv P�|Iõ!var concat = require("../concat")5�_ÐXZY:ÿÿÿÿ"Yv P�|õ9;B& var source = concat([3, 2, 1], boom)5�_ÐY[Z:ÿÿÿÿ"Yv P�|õ9;B var source = [3, 2, 1], boom)5�_ÐZ[:ÿÿÿÿ"Yv P�|Jõ9;B var source = [3, 2, 1, boom)5�_Ю°¯!ÿÿÿÿPŠôõ "8exports['test map empty'] = function(assert, complete) {õ"$+ assert.test.fail('map fn was executed')õ$&- assert(actual).to.be.empty().then(complete)õ')Aexports['test map.all with empty'] = function(assert, complete) {õ,.- assert(actual).to.be.empty().then(complete)õ/19exports['test number map'] = function(assert, complete) {õ241 assert(actual).to.be(2, 4, 6, 8).then(complete)õ57Jexports['test map.all same length streams'] = function(assert, complete) {õ:<= assert(actual).to.be('1a', '2b', '3c', '4d').then(complete)õ=?Dexports['test map with async stream'] = function(assert, complete) {õ@B4 assert(actual).to.be(6, 5, 4, 3, 2).then(complete)õCEJexports['test map.all sync & async stream'] = function(assert, complete) {õGI assert(actual).to.be(õOQ@exports['test map broken stream'] = function(assert, complete) {õTVI assert(actual).to.have.items(9, 4, 1).and.an.error(boom).then(complete)õWYFexports['test map.all with late error'] = function(assert, complete) {õ]_7 assert(actual).to.be('a3', 'b2', 'c1').then(complete)õ`bGexports['test map.all with early error'] = function(assert, complete) {õgiC assert(actual).to.have.items([ 3, 'a' ], [ 2, 'b' ], [ 1, 'c' ]).5�_Ъ¬«ÿÿÿÿPŠôõkõlJ8exports['test map empty'] = function(expect, complete) {& var actual = map(function(element) {+ expect.test.fail('map fn was executed') }, Stream.empty)- expect(actual).to.be.empty().then(complete)}Aexports['test map.all with empty'] = function(expect, complete) {# var actual = map(function(a, b) { return a + b) }, Stream.empty, Stream.of(1, 2, 3, 4))- expect(actual).to.be.empty().then(complete)}9exports['test number map'] = function(expect, complete) {% var numbers = Stream.of(1, 2, 3, 4)C var actual = map(function(number) { return number * 2 }, numbers)1 expect(actual).to.be(2, 4, 6, 8).then(complete)}Jexports['test map.all same length streams'] = function(expect, complete) {' var actual = map.all(function(a, b) { return a + b0 }, Stream.of(1, 2, 3, 4), Stream.from('abcd'))= expect(actual).to.be('1a', '2b', '3c', '4d').then(complete)}Dexports['test map with async stream'] = function(expect, complete) {. var source = delay(Stream.of(5, 4, 3, 2, 1))8 var actual = map(function(x) { return x + 1 }, source)4 expect(actual).to.be(6, 5, 4, 3, 2).then(complete)}Jexports['test map.all sync & async stream'] = function(expect, complete) {> var actual = map.all(Array, delay(Stream.of(5, 4, 3, 2, 1)),A Stream.from('abcde'), Stream.from('~@!#')) expect(actual).to.be( [ 5, 'a', '~' ], [ 4, 'b', '@' ], [ 3, 'c', '!' ], [ 2, 'd', '#' ] ).then(complete)}@exports['test map broken stream'] = function(expect, complete) { var boom = Error('Boom!')= var source = append(Stream.of(3, 2, 1), Stream.error(boom))? var actual = map(function(x) { return x * x }, delay(source))I expect(actual).to.have.items(9, 4, 1).and.an.error(boom).then(complete)}Fexports['test map.all with late error'] = function(expect, complete) { var boom = Error('boom')' var actual = map.all(function(a, b) { return a + bO }, Stream.from('abc'), delay(append(Stream.of(3, 2, 1), Stream.error(boom))))7 expect(actual).to.be('a3', 'b2', 'c1').then(complete)}Gexports['test map.all with early error'] = function(expect, complete) { var boom = Error('Boom!!') var actual = map.all(Array,M delay(append(Stream.of(3, 2, 1), Stream.error(boom))),+ Stream.from('abcd'))C expect(actual).to.have.items([ 3, 'a' ], [ 2, 'b' ], [ 1, 'c' ])./ and.error(boom).then(complete)}5�_Р¢¤¡ÿÿÿÿvPˆÜìõ5�_С£¢ÿÿÿÿvPˆÜðõ & var actual = map(5, function(item) {5�_Т£ÿÿÿÿvPˆÜòõ5�_Г•”1ÿÿÿÿPƒ�1õ8 assert.equal(called, 3, 'mapper called once pereitem')5�_Љ‹ŠÿÿÿÿPƒ�õ )var into = requirel'../accumulator').into5�çª