Files
lodash/.internal/baseSetToString.js
John-David Dalton 6cb3460fce Remove semicolons.
2017-02-05 22:22:04 -08:00

22 lines
556 B
JavaScript

import constant from '../constant.js'
import identity from '../identity.js'
/**
* 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`.
*/
function baseSetToString(func, string){
return Object.defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
})
}
export default baseSetToString