Created
February 8, 2018 01:01
-
-
Save Restuta/1c60d6f9d204a12be00d57ecd2e5a4b3 to your computer and use it in GitHub Desktop.
Base64 encode N times
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://runkit.com/embed/ogydgfyotoqc | |
var base64 = require("base-64") | |
const R = require('ramda') | |
var utf8 = require('utf8') | |
var text = 'Yeah, right?!' | |
const encode = R.pipe(utf8.encode, base64.encode) | |
const encodeN = R.pipe(...R.times(() => encode, 16)) | |
console.log(encodeN('hello')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment