Comparing version 1.3.0 to 1.3.1
1.3.1 / 2015-04-09 | ||
================== | ||
* fix(crypto): base64decode support return buffer | ||
1.3.0 / 2015-01-31 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -108,10 +108,14 @@ /*! | ||
* which substitutes - instead of + and _ instead of / in the standard Base64 alphabet. | ||
* @return {String} plain text. | ||
* @param {encoding} [encoding=utf8] if encoding = buffer, will return Buffer instance | ||
* @return {String|Buffer} plain text. | ||
*/ | ||
exports.base64decode = function base64decode(encode, urlsafe) { | ||
exports.base64decode = function base64decode(encodeStr, urlsafe, encoding) { | ||
if (urlsafe) { | ||
encode = encode.replace(/\-/g, '+').replace(/_/g, '/'); | ||
encodeStr = encodeStr.replace(/\-/g, '+').replace(/_/g, '/'); | ||
} | ||
encode = new Buffer(encode, 'base64'); | ||
return encode.toString(); | ||
var buf = new Buffer(encodeStr, 'base64'); | ||
if (encoding === 'buffer') { | ||
return buf; | ||
} | ||
return buf.toString(encoding || 'utf8'); | ||
}; | ||
@@ -118,0 +122,0 @@ |
{ | ||
"name": "utility", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A collection of useful utilities.", | ||
@@ -42,3 +42,3 @@ "main": "lib/utility.js", | ||
"keywords": [ | ||
"utility" | ||
"utility", "util", "utils" | ||
], | ||
@@ -48,4 +48,4 @@ "engines": { | ||
}, | ||
"author": "fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)", | ||
"author": "fengmk2 <fengmk2@gmail.com> (http://fengmk2.com)", | ||
"license": "MIT" | ||
} |
@@ -8,2 +8,3 @@ utility | ||
[![Gittip][gittip-image]][gittip-url] | ||
[![io.js version][iojs-image]][iojs-url] | ||
[![node version][node-image]][node-url] | ||
@@ -21,3 +22,5 @@ [![npm download][download-image]][download-url] | ||
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square | ||
[node-url]: http://nodejs.org/download/ | ||
[node-url]: https://nodejs.org/download/ | ||
[iojs-image]: https://img.shields.io/badge/io.js-%3E=_1.0-yellow.svg?style=flat-square | ||
[iojs-url]: https://iojs.org/ | ||
[download-image]: https://img.shields.io/npm/dm/utility.svg?style=flat-square | ||
@@ -24,0 +27,0 @@ [download-url]: https://npmjs.org/package/utility |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
28062
625
232
0