tickle/modules/utils/identity.mjs
2023-05-09 04:00:53 +02:00

17 lines
301 B
JavaScript

/**
* @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;