mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Move internal modules to “internal” folder.
This commit is contained in:
17
.internal/baseSetData.js
Normal file
17
.internal/baseSetData.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import identity from './identity.js';
|
||||
import metaMap from './.internal/metaMap.js';
|
||||
|
||||
/**
|
||||
* The base implementation of `setData` without support for hot loop shorting.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to associate metadata with.
|
||||
* @param {*} data The metadata.
|
||||
* @returns {Function} Returns `func`.
|
||||
*/
|
||||
const baseSetData = !metaMap ? identity : (func, data) => {
|
||||
metaMap.set(func, data);
|
||||
return func;
|
||||
};
|
||||
|
||||
export default baseSetData;
|
||||
Reference in New Issue
Block a user