has(key: string): boolean
Parameter | Type | Description |
key | string | Key. |
Type | Description |
boolean | Whether the search parameter for the key exists. |
import url from 'pts/url';export default function() {const params = new url.URLSearchParams('key1=value1&key2=value2');console.log(params.has('key1')); // trueconsole.log(params.has('key3')); // false}
Feedback