Socket
Socket
Sign inDemoInstall

is-urlsearchparams

Package Overview
Dependencies
15
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is-urlsearchparams

Determines whether a value is a URLSearchParams instance.


Version published
Weekly downloads
1.4K
decreased by-11.1%
Maintainers
1
Install size
765 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 27 Feb 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc