url-search

    1.1.4 • Public • Published

    url-search

    An address bar parameter managerment plugin.

    Usage

    const URLSearch = require('url-search');
    const url = new URLSearch();
    
    url.push('type', 1); // '?type=1'
    url.push('keyword', 'hello'); // '?type=1&keyword=hello'
    
    url.remove('type'); // '?keyword=hello'
    url.remove('keyword'); // ''
    
    url.data.type = 1;
    url.data.keyword = 'hello';
    url.update();
    // '?type=1&keyword=hello'
    

    Methods

    const URLSearch = require('url-search');
    URLSearch.prototype.push || function
    URLSearch.prototype.remove || function
    URLSearch.prototype.update || function
    URLSearch.parse || function
    

    Install

    npm i url-search

    DownloadsWeekly Downloads

    17

    Version

    1.1.4

    License

    MIT

    Unpacked Size

    23 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar