Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@jswork/next-param
Advanced tools
Readme
Parse and stringify URL query strings for next.
npm install -S @jswork/next-param
name | type | description |
---|---|---|
hash | object | 传入的参数列表 |
url | string | URL |
options | object | 其它选项 |
name | type | description |
---|---|---|
separator | string | 当参数值为 array 的时候, join 的连接字符 |
encode | function | encodeURI 或者 encodeURIComponent ,或者自定义 |
isEmpty | function | 过渡掉不需要的 value ,可以用这个函数;默认过滤掉 null/undefined |
transform | function | 对每一组 key/value 进行处理,最终返回需要用 & 拼接的字符串 |
encodeURIComponent
对 value 进行 1次 encode
处理encodeURIComponent
对 value 进行 2次 encode
处理js-base64
进行 encode
import '@jswork/next-param';
nx.param({ var1: 123, var2: 'str', ids: [1,2,3] });
// var1=123&var2=str&ids=1%2C2%2C3
Code released under the MIT license.
FAQs
Parse and stringify URL query strings for next.
The npm package @jswork/next-param receives a total of 100 weekly downloads. As such, @jswork/next-param popularity was classified as not popular.
We found that @jswork/next-param demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.