From 31f27ef66064545e21ecad5297ea84425f042909 Mon Sep 17 00:00:00 2001 From: Neal Lubin Date: Fri, 12 May 2017 10:17:02 -0400 Subject: [PATCH] 0.3.3 --- package.json | 2 +- src/operators/combine.js | 3 ++- src/operators/zip.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f52adab..35af57e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "servable", - "version": "0.3.2", + "version": "0.3.3", "description": "From scratch observable", "main": "lib/index.js", "jsnext:main": "src/index.js", diff --git a/src/operators/combine.js b/src/operators/combine.js index b300d63..0ffbe13 100644 --- a/src/operators/combine.js +++ b/src/operators/combine.js @@ -3,7 +3,8 @@ import { onSubscriptionsComplete } from '../utilities/onSubscriptionsComplete'; const nullHash = void(0); -export const combine = function (sources$, combineCallback = ((...args) => [...args])) { +const argsCallback = function () { return Array.from(arguments); } +export const combine = function (sources$, combineCallback = argsCallback) { return new Observable(function ({ next, error, complete }) { let subscriptions = []; diff --git a/src/operators/zip.js b/src/operators/zip.js index be4f3f9..01826f0 100644 --- a/src/operators/zip.js +++ b/src/operators/zip.js @@ -6,7 +6,8 @@ const startIndex = { indexAt: -1, }; -export const zip = function (sources$, combineCallback = ((...args) => [...args])) { +const argsCallback = function () { return Array.from(arguments); } +export const zip = function (sources$, combineCallback = argsCallback) { return new Observable(function ({ next, error, complete }) { let subscriptions = [];