Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Encoding and Decoding Base64 Strings in Node.js

'use strict';

let data = 'stackabuse.com';
let buff = new Buffer(data);
let base64data = buff.toString('base64');

console.log('"' + data + '" converted to Base64 is "' + base64data + '"');
Comment

Decodes a string of data which has been encoded using base-64 encoding - Nodejs

const atob = str => Buffer.from(str, 'base64').toString('binary'); atob('Zm9vYmFy'); // 'foobar'
Comment

PREVIOUS NEXT
Code Example
Javascript :: 1.047222170078745 
Javascript :: validate url in javascript 
Javascript :: javascript loop arrays 
Javascript :: dateFormat 
Javascript :: js update all links 
Javascript :: javascript tact template 
Javascript :: fiter on redux state 
Javascript :: react native custom ssl cer 
Javascript :: get all youtube playlist videos as json without api python 
Javascript :: safe check in js 
Javascript :: spherical.computeheading javascript 
Javascript :: newline in javascript 
Javascript :: position of element related to parent div in jquery 
Javascript :: tinymce-angular load slow 
Javascript :: _this.errors.push(error.response.data.error); 
Javascript :: add single quote in Innerhtml javascript string 
Javascript :: javascript add navbar link 
Javascript :: 9.4.1.3. Update Expression¶ // Loops 
Javascript :: removing element at index without changing the original array 
Javascript :: && in react jsx 
Javascript :: vue apollo refetch every x ms 
Javascript :: which is faster python or node.js for image saving as server 
Javascript :: js check if tab switched 
Javascript :: Why get error 404 when I try to pass date variable in get request to web api 
Javascript :: Grunt--project configuration object--uglify 
Javascript :: socket mock 
Javascript :: js load inside div from file 
Javascript :: js % 
Javascript :: modal nodejs 
Javascript :: https://social-network.samuraijs.com/article/faq_po_api 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =