mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Add getObject and releaseObject to setBindData.
Former-commit-id: d4152ccc078bfa64d62640d89b673057cf9f6a19
This commit is contained in:
15
lodash.js
15
lodash.js
@@ -323,7 +323,9 @@
|
||||
'array': null,
|
||||
'bottom': '',
|
||||
'cache': null,
|
||||
'configurable': false,
|
||||
'criteria': null,
|
||||
'enumerable': false,
|
||||
'false': false,
|
||||
'firstArg': '',
|
||||
'index': 0,
|
||||
@@ -344,7 +346,8 @@
|
||||
'true': false,
|
||||
'undefined': false,
|
||||
'useHas': false,
|
||||
'value': null
|
||||
'value': null,
|
||||
'writable': false
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1550,12 +1553,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