Awesome Open Source
Awesome Open Source

QRCode Terminal For Deno

deno

Run the Demo

deno run https://deno.land/x/qrcode_terminal/demo/demo.js

Examples

import qrcode from 'https://deno.land/x/qrcode_terminal/mod.js'

console.log("\n\nScan It Skip To Google \n")
qrcode.generate("https://www.google.com")

output:

demo

Usage

To display some data to the terminal just call:

qrcode.generate('This will be a QRCode, eh!');

You can even specify the error level (default is 'L'):

qrcode.setErrorLevel('Q');
qrcode.generate('This will be a QRCode with error level Q!');

If you don't want to display to the terminal but just want to string you can provide a callback:

qrcode.generate('http://github.com', function (qrcode) {
    console.log(qrcode);
});

If you want to display small output, provide opts with small:

qrcode.generate('This will be a small QRCode, eh!', {small: true});

qrcode.generate('This will be a small QRCode, eh!', {small: true}, function (qrcode) {
    console.log(qrcode)
});

Acknowledgments

Special thanks to the prior work by @gtanner in qrcode-terminal.

Buy me a cup of coffee

If you think the project has helped you, you can buy a cup of coffee for the author as a sign of encouragement

deno run https://deno.land/x/qrcode_terminal/support/buy-me-a-cup-of-coffee.js

License

Do What The Fuck You Want To Public License



Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,119,969
Terminal (18,067
Qrcode (5,802
Coffee (3,477