Socket
Socket
Sign inDemoInstall

urlencode

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urlencode - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

History.md
1.0.1 / 2015-07-06
==================
* refactor: add \n to benchmark
* fix '\n' encoding
1.0.0 / 2015-04-04

@@ -3,0 +9,0 @@ ==================

10

lib/urlencode.js
/**!
* urlencode - lib/urlencode.js
*
* Copyright(c) 2012 - 2014
* MIT Licensed
*
* Authors:
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.com)
*/

@@ -35,4 +34,9 @@

var encodeStr = '';
var ch = '';
for (var i = 0; i < buf.length; i++) {
encodeStr += '%' + buf[i].toString('16');
ch = buf[i].toString('16');
if (ch.length === 1) {
ch = '0' + ch;
}
encodeStr += '%' + ch;
}

@@ -39,0 +43,0 @@ encodeStr = encodeStr.toUpperCase();

This software is licensed under the MIT License.
Copyright (C) 2012 - 2014 fengmk2 <fengmk2@gmail.com>
Copyright (C) 2015 node-modules

@@ -5,0 +6,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "urlencode",
"version": "1.0.0",
"version": "1.0.1",
"description": "encodeURIComponent with charset",
"main": "index.js",
"main": "lib/urlencode.js",
"files": [
"lib/urlencode.js"
],
"scripts": {
"test": "make test-all"
"test": "node_modules/.bin/mocha -R spec -t 20000 -r should test/*.test.js",
"test-cov": "node node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -t 20000 -r should test/*.test.js",
"test-travis": "node node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- -t 20000 -r should test/*.test.js",
"jshint": "jshint .",
"autod": "autod -w --prefix '~' -t test -e examples",
"cnpm": "npm install --registry=https://registry.npm.taobao.org",
"benchmark": "node benchmark/urlencode.js && node benchmark/urlencode.decode.js"
},
"config": {
"blanket": {
"pattern": "urlencode/lib"
},
"travis-cov": { "threshold": 98 }
},
"dependencies": {
"iconv-lite": "~0.4.7",
"utility": "~1.3.0"
"iconv-lite": "~0.4.11",
"utility": "~1.4.0"
},

@@ -25,8 +28,6 @@ "devDependencies": {

"contributors": "*",
"coveralls": "*",
"istanbul": "~0.3.17",
"jshint": "*",
"mocha": "*",
"mocha-lcov-reporter": "*",
"should": "~5.2.0",
"travis-cov": "*"
"should": "7"
},

@@ -33,0 +34,0 @@ "homepage": "https://github.com/node-modules/urlencode",

@@ -6,4 +6,2 @@ urlencode [![Build Status](https://secure.travis-ci.org/node-modules/urlencode.png)](http://travis-ci.org/node-modules/urlencode) [![Coverage Status](https://coveralls.io/repos/node-modules/urlencode/badge.png)](https://coveralls.io/r/node-modules/urlencode)

![logo](https://raw.github.com/node-modules/urlencode/master/logo.png)
encodeURIComponent with charset, e.g.: `gbk`

@@ -14,3 +12,3 @@

```bash
$ npm install urlencode --registry=http://r.cnpmjs.org
$ npm install urlencode
```

@@ -73,23 +71,2 @@

(The MIT License)
Copyright (c) 2012 - 2014 fengmk2 &lt;fengmk2@gmail.com&gt;
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[MIT](LICENSE.txt)
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc