How to use the url-parse.qs function in url-parse

To help you get started, we’ve selected a few url-parse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github decred / dcrdata / cmd / dcrdata / public / js / controllers / pagenavigation_controller.js View on Github external
setPageSize () {
    const url = Url(window.location.href)
    const q = Url.qs.parse(url.query)
    delete q.offset
    delete q.height
    q[this.pagesizeTarget.dataset.offsetkey] = this.pagesizeTarget.dataset.offset
    q.rows = this.pagesizeTarget.selectedOptions[0].value
    if (this.hasVotestatusTarget) {
      q.byvotestatus = this.votestatusTarget.selectedOptions[0].value
    }
    url.set('query', q)
    Turbolinks.visit(url.toString())
  }
github rockstat / web-sdk / src / functions / pageSource.js View on Github external
import removeWww from './removeWww';
import objectKeys from './objectKeys';
import { isArray } from './type';
import urlParse from 'url-parse';
import punycode from 'punycode';

import {
  SESSION_CAMPAIGN,
  SESSION_DIRECT,
  SESSION_INTERNAL,
  SESSION_ORGANIC,
  SESSION_REFERRAL,
  SESSION_SOCIAL,
} from "../Constants";

const qs = urlParse.qs;

const ENGINE_GOOGLE = 'google';
const ENGINE_YANDEX = 'yandex';
const ENGINE_MAILRU = 'mailru';
const ENGINE_RAMBLER = 'rambler';
const ENGINE_BING = 'bing';
const ENGINE_YAHOO = 'yahoo';
const ENGINE_NIGMA = 'nigma';
const ENGINE_DUCKDUCKGO = 'duckduckgo';

const ENGINE_FACEBOOK = 'fb';
const ENGINE_TWITTER = 'twitter';
const ENGINE_VK = 'vk';
const ENGINE_OK = 'ok';
const ENGINE_LINKEDIN = 'linkedin';
const ENGINE_INSTAGRAM = 'instagram';

url-parse

Small footprint URL parser that works seamlessly across Node.js and browser environments

MIT
Latest version published 3 years ago

Package Health Score

74 / 100
Full package analysis

Popular url-parse functions