urlencode-gb2312-ignore

1.0.3 • Public • Published

urlencode-gb2312-ignore

Build Status Coverage Status

某些第三方 api 只支援 gb2312 参数, 但碍于又不想装 iconv (alpine 需要装 python), 所以采用 urlencode (iconv-lite based) charset = 'gb2312' 时触发 ignore

Install

$ npm install urlencode-gb2312-ignore

Usage

var urlencode = require('urlencode-gb2312-ignore');
 
console.log(urlencode('', 'gb2312')); // '%B2%E2'
console.log(urlencode('', 'gb2312')); // '', 因为 '測' 不在 gb2312 list
 
// 其余用法请参考 https://github.com/node-modules/urlencode

License

MIT

GB2312 of unicode list

Package Sidebar

Install

npm i urlencode-gb2312-ignore

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

176 kB

Total Files

17

Last publish

Collaborators

  • thitbbeb