From 63682bee844f3397c8da52eb383cf064b276169b Mon Sep 17 00:00:00 2001 From: Catherine Liu Date: Tue, 3 Apr 2018 12:03:38 -0700 Subject: [PATCH] Removed sleep function. No longer needed (#411) --- common/functions/index.js | 2 -- common/functions/sleep.js | 19 ------------------- 2 files changed, 21 deletions(-) delete mode 100644 common/functions/sleep.js diff --git a/common/functions/index.js b/common/functions/index.js index 3e79189a57fea..0d7c042e18326 100644 --- a/common/functions/index.js +++ b/common/functions/index.js @@ -32,7 +32,6 @@ import { rowCount } from './rowCount'; import { repeatImage } from './repeatImage'; import { revealImage } from './revealImage'; import { seriesStyle } from './seriesStyle'; -import { sleep } from './sleep'; import { sort } from './sort'; import { staticColumn } from './staticColumn'; import { string } from './string'; @@ -77,7 +76,6 @@ export const commonFunctions = [ rowCount, seriesStyle, sort, - sleep, staticColumn, string, table, diff --git a/common/functions/sleep.js b/common/functions/sleep.js deleted file mode 100644 index c48b5d83e73af..0000000000000 --- a/common/functions/sleep.js +++ /dev/null @@ -1,19 +0,0 @@ -export const sleep = () => ({ - name: 'sleep', - help: - 'This pass-through function introduces a delay to expressions. We mostly use it to simulate slow data sources. ' + - 'This should not be used in production. If you need this, you did something wrong', - args: { - _: { - types: ['number'], - default: 0, - aliases: [], - help: 'The number of milliseconds to wait', - }, - }, - fn: (context, args) => { - return new Promise(function(resolve) { - setTimeout(() => resolve(context), args._); - }); - }, -});