mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 09:59:48 +02:00
Use optional argument in memoize-util benchmark
This commit is contained in:
@@ -3,7 +3,7 @@ const { default: memoize } = require('../../../lib/utils/memoize')
|
||||
module.exports = {
|
||||
setup(state) {
|
||||
let obj = {
|
||||
fibonacci(n) {
|
||||
fibonacci(n = 20) {
|
||||
if (n === 0 || n === 1) {
|
||||
return n
|
||||
} else {
|
||||
@@ -17,6 +17,6 @@ module.exports = {
|
||||
},
|
||||
|
||||
run(obj) {
|
||||
obj.fibonacci(20)
|
||||
obj.fibonacci()
|
||||
}
|
||||
}
|
||||
|
@@ -179,6 +179,7 @@ const Node = {
|
||||
|
||||
/**
|
||||
* Recursively filter all descendant nodes with `iterator`, depth-first.
|
||||
* It is different from `filterDescendants` in regard of the order of results.
|
||||
*
|
||||
* @param {Function} iterator
|
||||
* @return {List} nodes
|
||||
|
Reference in New Issue
Block a user