mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Eslint cleanup (imports left), except template.
This commit is contained in:
@@ -18,8 +18,7 @@ import toString from './toString.js'
|
||||
* replace('Hi Fred', 'Fred', 'Barney')
|
||||
* // => 'Hi Barney'
|
||||
*/
|
||||
function replace() {
|
||||
const args = arguments
|
||||
function replace(...args) {
|
||||
const string = toString(args[0])
|
||||
|
||||
return args.length < 3 ? string : string.replace(args[1], args[2])
|
||||
|
||||
Reference in New Issue
Block a user