Comparing version 1.0.1 to 2.0.0
34
index.js
@@ -1,33 +0,1 @@ | ||
/* | ||
* b64.js | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
var b64 = {}; | ||
b64.encode = function base64_encode(message) { | ||
if(typeof message !== "string") { | ||
throw new Error("Argument is not a string"); | ||
} | ||
return new Buffer(message).toString('base64'); | ||
}; | ||
b64.decode = function base64_decode(message) { | ||
if(typeof message !== "string") { | ||
throw new Error("Argument is not a string"); | ||
} | ||
return new Buffer(message, 'base64').toString('utf8'); | ||
}; | ||
module.exports = b64; | ||
module.exports = require('./lib'); |
@@ -1,8 +0,33 @@ | ||
{ "author": "Nuno Job <nunojobpinto@gmail.com> [http://nunojob.com]" | ||
, "description": "Base64 encode and decode UTF-8 strings" | ||
, "name": "b64" | ||
, "tags": ["base64", "encode", "decode", "base 64", "string"] | ||
, "version": "1.0.1" | ||
, "repository": { "type": "git", "url": "http://github.com/dscape/b64.git" } | ||
, "engines": { "node": ">=v0.4.8" } | ||
} | ||
{ | ||
"name": "b64", | ||
"description": "Base64 streaming encoder and decoder", | ||
"version": "2.0.0", | ||
"repository": "git://github.com/hapijs/b64", | ||
"main": "index", | ||
"keywords": [ | ||
"buffer", | ||
"base64", | ||
"decode", | ||
"encode", | ||
"stream" | ||
], | ||
"engines": { | ||
"node": ">=0.10.32" | ||
}, | ||
"dependencies": { | ||
"hoek": "2.x.x" | ||
}, | ||
"devDependencies": { | ||
"lab": "4.x.x", | ||
"wreck": "5.x.x" | ||
}, | ||
"scripts": { | ||
"test": "make test-cov" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "BSD", | ||
"url": "http://github.com/hapijs/b64/raw/master/LICENSE" | ||
} | ||
] | ||
} |
@@ -1,29 +0,7 @@ | ||
## B64 | ||
#b64 | ||
Base64 encode and decode UTF-8 strings for node.js | ||
Base64 streaming encoder and decoder | ||
## Instalation | ||
[![Build Status](https://secure.travis-ci.org/hapijs/b64.png)](http://travis-ci.org/hapijs/b64) | ||
1. Install [npm][1] | ||
2. `npm install b64` | ||
## Usage | ||
$ node | ||
var base64 = require('b64'); | ||
var encoded = base64.encode("node.js"); | ||
console.log(base64.decode(encoded)); | ||
> node.js | ||
## Meta | ||
* Code: `git clone git://github.com/dscape/b64.git` | ||
* Home: <http://github.com/dscape/b64> | ||
* Bugs: <http://github.com/dscape/b64/issues> | ||
(oO)--',- in [caos][3] | ||
[1]: http://npmjs.org | ||
[2]: http://github.com/dscape/b64/issues | ||
[3]: http://caos.di.uminho.pt/ | ||
Lead Maintainer - [Eran Hammer](https://github.com/hueniverse) |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
12701
70644
10
247
1
2
2
8
1
2
+ Addedhoek@2.x.x
+ Addedhoek@2.16.3(transitive)