@eluvio/elv-js-helpers
Version:
A collection of Javascript helper functions used by several Eluvio libraries.
22 lines (20 loc) • 446 B
JavaScript
/**
* Given an input, returns that input. Used for composing functional workflows, often indicating 'no-op'.
*
* @function
* @category Functional
* @sig a -> a
* @param {*} x - The input value
* @returns {*} The input value
* @example
*
* 'use strict'
* const identity = require('@eluvio/elv-js-helpers/Functional/identity')
*
* identity(42) //=> 42
*/
const identity = x => {
return x
}
module.exports = identity