mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Add getObject and releaseObject to setBindData.
Former-commit-id: d4152ccc078bfa64d62640d89b673057cf9f6a19
This commit is contained in:
15
dist/lodash.compat.js
vendored
15
dist/lodash.compat.js
vendored
@@ -321,7 +321,9 @@
|
||||
'array': null,
|
||||
'bottom': '',
|
||||
'cache': null,
|
||||
'configurable': false,
|
||||
'criteria': null,
|
||||
'enumerable': false,
|
||||
'false': false,
|
||||
'firstArg': '',
|
||||
'index': 0,
|
||||
@@ -341,7 +343,8 @@
|
||||
'true': false,
|
||||
'undefined': false,
|
||||
'useHas': false,
|
||||
'value': null
|
||||
'value': null,
|
||||
'writable': false
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1512,12 +1515,10 @@
|
||||
* @param {Mixed} value The value to set.
|
||||
*/
|
||||
var setBindData = !defineProperty ? noop : function(func, value) {
|
||||
defineProperty(func, '__bindData__', {
|
||||
'configurable': false,
|
||||
'enumerable': false,
|
||||
'value': value,
|
||||
'writable': false
|
||||
});
|
||||
var descriptor = getObject();
|
||||
descriptor.value = value;
|
||||
defineProperty(func, '__bindData__', descriptor);
|
||||
releaseObject(descriptor);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user