Socket
Socket
Sign inDemoInstall

@feizheng/next-param

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @feizheng/next-param

Param based on next.


Version published
Maintainers
1
Install size
28.2 kB
Created

Readme

Source

next-param

Param based on next.

installation

npm install -S @feizheng/next-param

apis

nametypedescription
hashobject传入的参数列表
urlstringURL
optionsobject其它选项

options

nametypedescription
joinKeystring当参数值为 array 的时候, join 的连接字符
encodefunctionencodeURI 或者 encodeURIComponent ,或者自定义
isEmptyfunction过渡掉不需要的 value ,可以用这个函数;默认过滤掉 null/undefined
transformfunction对每一组 key/value 进行处理,最终返回需要用 & 拼接的字符串

usage

import '@feizheng/next-param';

nx.param({ var1: 123, var2: 'str', ids: [1,2,3] });
// var1=123&var2=str&ids=1%2C2%2C3

FAQs

Last updated on 11 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc