mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Add getObject and releaseObject to setBindData.
Former-commit-id: d4152ccc078bfa64d62640d89b673057cf9f6a19
This commit is contained in:
15
dist/lodash.js
vendored
15
dist/lodash.js
vendored
@@ -312,7 +312,9 @@
|
||||
return objectPool.pop() || {
|
||||
'array': null,
|
||||
'cache': null,
|
||||
'configurable': false,
|
||||
'criteria': null,
|
||||
'enumerable': false,
|
||||
'false': false,
|
||||
'index': 0,
|
||||
'leading': false,
|
||||
@@ -325,7 +327,8 @@
|
||||
'trailing': false,
|
||||
'true': false,
|
||||
'undefined': false,
|
||||
'value': null
|
||||
'value': null,
|
||||
'writable': false
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1199,12 +1202,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