From 81a78b2ba9e3cc017fe246f712f3d2a8e85a15a8 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 16 Apr 2020 11:12:17 +0300 Subject: [PATCH] Remove pipeLog --- snippets_archive/pipeLog.md | 16 ---------------- test/pipeLog.test.js | 8 -------- 2 files changed, 24 deletions(-) delete mode 100644 snippets_archive/pipeLog.md delete mode 100644 test/pipeLog.test.js diff --git a/snippets_archive/pipeLog.md b/snippets_archive/pipeLog.md deleted file mode 100644 index 5623b465f..000000000 --- a/snippets_archive/pipeLog.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: pipeLog -tags: utility,beginner ---- - -Logs a value and returns it. - -Use `console.log` to log the supplied value, combined with the `||` operator to return it. - -```js -const pipeLog = data => console.log(data) || data; -``` - -```js -pipeLog(1); // logs `1` and returns `1` -``` \ No newline at end of file diff --git a/test/pipeLog.test.js b/test/pipeLog.test.js deleted file mode 100644 index 0244ecba2..000000000 --- a/test/pipeLog.test.js +++ /dev/null @@ -1,8 +0,0 @@ -const {pipeLog} = require('./_30s.js'); - -test('pipeLog is a Function', () => { - expect(pipeLog).toBeInstanceOf(Function); -}); -test('pipeLog returns the given value', () => { - expect(pipeLog('hi')).toBe('hi'); -});