tickle/modules/utils/identity.mjs

17 lines
301 B
JavaScript
Raw Permalink Normal View History

2023-05-09 02:00:53 +00:00
/**
* @template T
* @param {T} [value]
* @returns {Promise<T>}
*/
export const awaitedIdentity = (value) => Promise.resolve(value);
/**
* @template T
* @param {T} [value]
* @returns {T}
*/
export const identity = (value) => value
identity.awaited = awaitedIdentity;
export default identity;