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

b64

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

b64 - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

.npmignore

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

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