From 6d83500de41f8bc4e84d38ebf8ae6e2c3df0de20 Mon Sep 17 00:00:00 2001 From: Harris Miller Date: Thu, 2 May 2024 08:51:29 -0600 Subject: [PATCH] Chore: make Flow jsdoc example runnable in the repl (#3462) --- source/flow.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/flow.js b/source/flow.js index 87e1da7b1..63fce4f21 100644 --- a/source/flow.js +++ b/source/flow.js @@ -27,11 +27,11 @@ import _reduce from './internal/_reduce.js'; * @return {*} z The result of applying the seed value to the function pipeline * @see R.pipe * @example - * R.flow(9, [Math.sqrt, R.negate, R.inc]), //=> -2 + * R.flow(9, [Math.sqrt, R.negate, R.inc]); //=> -2 * - * const defaultName = 'Jane Doe'; - * const savedName = R.flow(localStorage.get('name'), [R.when(R.isNil(defaultName)), R.match(/(.+)\s/), R.nth(0)]); - * const givenName = R.flow($givenNameInput.value, [R.trim, R.when(R.isEmpty, R.always(savedName))]) + * const personObj = { first: 'Jane', last: 'Doe' }; + * const fullName = R.flow(personObj, [R.values, R.join(' ')]); //=> "Jane Doe" + * const givenName = R.flow(' ', [R.trim, R.when(R.isEmpty, R.always(fullName))]); //=> "Jane Doe" */ var flow = _curry2(function flow(seed, pipeline) { return _reduce(applyTo, seed, pipeline);