param-by-name

1.0.1 • Public • Published

param-by-name

Parsing url parameters within the browser can be a pain, so this tries to make it a little easier.

Example

import paramByName from 'param-by-name';

const search = paramByName('search');
if (Boolean(search)) {
  alert(`Searching for ${search}`);
} else {
  alert('No search param found');
}

Readme

Keywords

none

Package Sidebar

Install

npm i param-by-name

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • cyberlane