1.0.6 • Published 1 year ago
extra-method v1.0.6
// es6 before
require('extra-method')
// es6 after
import 'extra-method'
".fasterMap()" method fast then ".map()"
The ".fasterMap()" method is almost twice as fast as the ".map()" ten. Usage is the same.
var arr = [1, 4, 3, 3, 9, 11]
arr.fastermap(x => x > 5)
return 9, 11
".remove()" method
var arr = [1, 4, 3, 3, 9, 11]
arr.remove(3)
return [1, 4, 3, 9, 11]
".removeAll()" method
var arr = [1, 4, 3, 3, 9, 11]
arr.removeAll(3)
return [1, 4, 9, 11]