mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Use Array#splice directly.
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import assocIndexOf from './assocIndexOf.js'
|
||||
|
||||
/** Built-in value references. */
|
||||
const splice = Array.prototype.splice
|
||||
|
||||
class ListCache {
|
||||
|
||||
/**
|
||||
@@ -51,7 +48,7 @@ class ListCache {
|
||||
if (index == lastIndex) {
|
||||
data.pop()
|
||||
} else {
|
||||
splice.call(data, index, 1)
|
||||
data.splice(index, 1)
|
||||
}
|
||||
--this.size
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user