From 47ce645897059415879ac25fa486ffd7eb4e4a4f Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 14 Sep 2017 11:51:33 +0200 Subject: [PATCH] implement slice --- www/common/common-util.js | 4 ++++ www/common/cryptpad-common.js | 1 + 2 files changed, 5 insertions(+) diff --git a/www/common/common-util.js b/www/common/common-util.js index aed4dd5d2..f6ec8d4df 100644 --- a/www/common/common-util.js +++ b/www/common/common-util.js @@ -202,5 +202,9 @@ define([], function () { }; }; + Util.slice = function (A) { + return Array.prototype.slice.call(A); + }; + return Util; }); diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 79bbe9b70..84f7c47a6 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -103,6 +103,7 @@ define([ common.getAppType = Util.getAppType; common.notAgainForAnother = Util.notAgainForAnother; common.uid = Util.uid; + common.slice = Util.slice; // import hash utilities for export var createRandomHash = common.createRandomHash = Hash.createRandomHash;