Resets the query (into empty object).
Keys specified in ignore option will not be deleted.
ignore
Falsy value or boolean values in the array will be discarded.
クエリをリセットして、空のオブジェクトにします。
ignore オプションに指定したキーについては リセットされず に残ります。
Falsy な値(偽値)や、真偽値 は無視されます。
const query = { a: "aaa", b: "bbb" }resetQuery({ ignore: "a" })(query) // -> { a: "aaa" }resetQuery({ ignore: ["a", "meaningless"] }) // -> { a: "aaa" }resetQuery({ ignore: ["a", true, false, 0, null] })(query) // -> { a: "aaa" } Copy
const query = { a: "aaa", b: "bbb" }resetQuery({ ignore: "a" })(query) // -> { a: "aaa" }resetQuery({ ignore: ["a", "meaningless"] }) // -> { a: "aaa" }resetQuery({ ignore: ["a", true, false, 0, null] })(query) // -> { a: "aaa" }
Optional
keys not to delete. Falsy value or true will be discarded.
true
Resets the query (into empty object).
Keys specified in
ignore
option will not be deleted.Falsy value or boolean values in the array will be discarded.
クエリをリセットして、空のオブジェクトにします。
ignore
オプションに指定したキーについては リセットされず に残ります。Falsy な値(偽値)や、真偽値 は無視されます。