Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

utility

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utility - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

5

History.md
0.0.9 / 2013-05-08
==================
* Safe encodeURIComponent and decodeURIComponent
0.0.8 / 2013-05-06

@@ -3,0 +8,0 @@ ==================

@@ -131,2 +131,32 @@ /*!

/**
* Safe encodeURIComponent, won't throw any error.
* If `encodeURIComponent` error happen, just return the original value.
*
* @param {String} text
* @return {String} URL encode string.
*/
exports.encodeURIComponent = function (text) {
try {
return encodeURIComponent(text);
} catch (e) {
return text;
}
};
/**
* Safe decodeURIComponent, won't throw any error.
* If `decodeURIComponent` error happen, just return the original value.
*
* @param {String} encodeText
* @return {String} URL decode original string.
*/
exports.decodeURIComponent = function (encodeText) {
try {
return decodeURIComponent(encodeText);
} catch (e) {
return encodeText;
}
};
var MONTHS = [

@@ -133,0 +163,0 @@ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'

2

package.json
{
"name": "utility",
"version": "0.0.8",
"version": "0.0.9",
"description": "A collection of useful utilities.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -54,2 +54,5 @@ utility [![Build Status](https://secure.travis-ci.org/fengmk2/utility.png)](http://travis-ci.org/fengmk2/utility)

utils.datestruct(); // { YYYYMMDD: 20130416, H: 8 }
// Safe encodeURIComponent and decodeURIComponent
utils.decodeURIComponent(utils.encodeURIComponent('你好, nodejs')).should.equal('你好, nodejs');
```

@@ -99,2 +102,16 @@

## Authors
```bash
$ git summary
project : utility
repo age : 6 months
active : 8 days
commits : 23
files : 14
authors :
23 fengmk2 100.0%
```
## License

@@ -101,0 +118,0 @@

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