Safely extract url query params into an object
$ yarn add url-attrs
import urlAttrs from 'url-attrs'
const someUrl = 'http://www.';
urlAttrs(someUrl, {
include: ['id', 'name']
})
options
{
include?: string[],
delimiter?: string, // & or #
}
- Use URL class?