main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
454 bytes
|
Line | |
---|
1 | import identity from './identity.js';
|
---|
2 | import metaMap from './_metaMap.js';
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * The base implementation of `setData` without support for hot loop shorting.
|
---|
6 | *
|
---|
7 | * @private
|
---|
8 | * @param {Function} func The function to associate metadata with.
|
---|
9 | * @param {*} data The metadata.
|
---|
10 | * @returns {Function} Returns `func`.
|
---|
11 | */
|
---|
12 | var baseSetData = !metaMap ? identity : function(func, data) {
|
---|
13 | metaMap.set(func, data);
|
---|
14 | return func;
|
---|
15 | };
|
---|
16 |
|
---|
17 | export default baseSetData;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.