Skip to content

Instantly share code, notes, and snippets.

@Richienb
Created January 4, 2020 10:55
Show Gist options
  • Save Richienb/6564c0b09f59075b59b909a057de390f to your computer and use it in GitHub Desktop.
Save Richienb/6564c0b09f59075b59b909a057de390f to your computer and use it in GitHub Desktop.
Read file as binary
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