Created
January 4, 2020 10:55
-
-
Save Richienb/6564c0b09f59075b59b909a057de390f to your computer and use it in GitHub Desktop.
Read file as binary
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
const basea = require("basea") | |
const val = [...fs.readFileSync("example.js")] | |
const res = val.map(val => basea(val.toString(), 2)) | |
console.log(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment