Function isQueryEmpty

Returns true if the query is empty while undefined, "", and [] value will be ignored.

If ignore option is specified, the keys will be ignored.


クエリが であるかどうかの真偽値を返す。 ただし、undefined, "", and [] があっても無視する。

もし ignore オプションが指定されている場合、指定したキーの値があっても無視する。

isQueryPristine({}) // -> true
isQueryPristine({ id: "a" }, { ignore: "id" }) // -> true
  • Parameters

    • query: ParsedUrlQuery
    • options: {
          ignore?: null | string | string[];
      } = {}
      • Optionalignore?: null | string | string[]

    Returns boolean