Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

18 righe
454 B

  1. import identity from './identity.js';
  2. import metaMap from './_metaMap.js';
  3. /**
  4. * The base implementation of `setData` without support for hot loop shorting.
  5. *
  6. * @private
  7. * @param {Function} func The function to associate metadata with.
  8. * @param {*} data The metadata.
  9. * @returns {Function} Returns `func`.
  10. */
  11. var baseSetData = !metaMap ? identity : function(func, data) {
  12. metaMap.set(func, data);
  13. return func;
  14. };
  15. export default baseSetData;