Learning Path For Deno | With Gun
Last touched on 14 August 2022
Parameter | Value | Note |
---|---|---|
Official Website | Click Here | |
Github Repository | Click Here | |
Node.js Blog |
Parameter | Value | Note |
---|---|---|
Repository bcrypto | Click Here | JS Crypto Library |
For check installed node on your machine, execute this command :
$ deno --version
What is Buffer? you can read my repository here.
-
Create Buffer from String
const buf = Buffer.from("hello world", "utf8"); console.log(buf); //<Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
-
Check Buffer Object
console.log(typeof buf); //object console.log(buf instanceof Buffer); // true
-
Convert Buffer to Base64 String
console.log(buf.toString("base64")); //aGVsbG8gd29ybGQ=
-
Convert Buffer to Hex
console.log(buf.toString("hex")); //68656c6c6f20776f726c64
-
Convert Buffer to ASCII
console.log(Buffer.from("SGVsbG8gV29ybGQ=", "base64").toString("ascii")); //Hello World
-
Reserved
- Promise-based Unlink - Click Here
- Synchronous Unlink - Click Here
- Promise-based Read File - Click Here
- Synchronous Read File - Click Here
- Reserved
- Read & Write File Apps
- Playing with Buffer
- Reserved
So what is the difference between Stream & Buffer? A buffer has a specified, definite length whereas a stream does not. A stream is a sequence of bytes that is read and/or written to, while a buffer is a sequence of bytes that is stored.