JSPM

is-urlsearchparams

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1874
  • Score
    100M100P100Q119858F
  • License MIT

Determines whether a value is a URLSearchParams instance.

Package Exports

  • is-urlsearchparams

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-urlsearchparams) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-urlsearchparams NPM Version File Size Build Status Dependency Monitor

Determines whether a value is a URLSearchParams instance.

Works cross-realm/iframe and despite Symbol.toStringTag.

Installation

Node.js >= 8 is required. To install, type this at the command line:

npm install is-urlsearchparams

Usage

const isURLSearchParams = require('is-urlsearchparams');

isURLSearchParams('param=value');  //-> false
isURLSearchParams(new URLSearchParams('param=value'));  //-> true

Optionally, acceptance can be extended to incomplete URLSearchParams implementations that lack entries, sort and values methods (which are common in many modern web browsers):

const params = new URLSearchParams('param=value');

console.log(params.sort);  //-> undefined

isURLSearchParams.lenient(params);  //-> true