Code Example:
var qr_image the require = ( 'Image-QR' ) var FS = the require ( 'FS' ) var temp_qrcode = qr_image.image ( 'https://www.baidu.com' , { // set the fault rate, L (low) , M (the default), Q (high), H (maximum). ec_level: 'Q' }) temp_qrcode.pipe (the require ( .. 'FS') createWriteStream ( 'QR-Q.png') ON ( ' Finish ', function () { the console.log ( ' Write Finished ' ) }))
Will generate a two-dimensional code images in the current directory after running successfully.
npm Address: https://www.npmjs.com/package/qr-image