Files
lodash/_baseSetToString.js
John-David Dalton 0961d6edde Bump to v4.16.3.
2016-10-02 21:51:40 -07:00

22 lines
647 B
JavaScript

define(['./constant', './_defineProperty', './identity'], function(constant, defineProperty, identity) {
/**
* The base implementation of `setToString` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var baseSetToString = !defineProperty ? identity : function(func, string) {
return defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
});
};
return baseSetToString;
});