Options
All
  • Public
  • Public/Protected
  • All
Menu

Module url/getParam

Index

Functions

Functions

Const getUrlParam

0.0.35 provide
  • getUrlParam(key: string): null | string
  • Get the current value on the url

    remarks

    如果URL上跟了两个同名的参数,默认返回第一个匹配的参数 返回结果会使用decodeURIComponent进行解码

    example
    import { url } from 'onex-utils';
    const { getUrlParam } = url;
    console.log(getUrlParam('key'));
    

    Parameters

    • key: string

      The current url parameter name

    Returns null | string

    the current url parameter value with the key