1.2.10 • Published 4 years ago

url-param v1.2.10

Weekly downloads
24
License
MIT
Repository
github
Last release
4 years ago

url-param

switch between searchStr and paramsObj

Build Status codecov npm.io npm.io

install

$ npm install url-param

import

import { u } from 'url-param'

usage

paramsObj <=> searchStr

const searchStr = u({ q: '⭐' })
// => '?q=%E2%AD%90'

const paramsObj = u('?q=%E2%AD%90')
// => {q: "⭐"}

const urlObj = u('https://www.google.com/search?q=%E2%AD%90')
// => {q: "⭐"}

for current location.search

// say `location.search` is '?a=%21&%CE%B2=2'
u()         // => {a: "!", β: "2"}
  u('a')    // => '!'
  u().β     // => '2'
  u()['β']  // => '2'

License

MIT

1.2.10

4 years ago

1.3.2

6 years ago

1.3.0

6 years ago

1.2.8

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.1.0

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago