|
|
há 5 anos atrás | |
|---|---|---|
| .. | ||
| data | há 5 anos atrás | |
| dist | há 5 anos atrás | |
| src | há 5 anos atrás | |
| LICENSE | há 5 anos atrás | |
| README.md | há 5 anos atrás | |
| index.js | há 5 anos atrás | |
| package.json | há 5 anos atrás | |
一个小而快的GBK库,支持浏览器
dist/ 路径下的文件GBK.encode('时顺地?abc地')
> [ 202, 177, 203, 179, 181, 216, 63, 97, 98, 99, 181, 216 ]
GBK.decode([ 202, 177, 203, 179, 181, 216, 63, 97, 98, 99, 181, 216 ])
> 时顺地?abc地;
encodeURI 函数一至GBK.URI.encodeURI('https://abc.com/?kk=abv&bb=火车头#top')
> https://abc.com/?kk=abv&bb=%BB%F0%B3%B5%CD%B7#top
decodeURI 函数一至encodeURIComponent 函数一至GBK.URI.encodeURIComponent('https://abc.com/?kk=abv&bb=火车头#top')
> https%3A%2F%2Fabc.com%2F%3Fkk%3Dabv%26bb%3D%BB%F0%B3%B5%CD%B7%23top
decodeURIComponent 函数一至