* Split core lib into multiple files * Refactor data encoding methods * Refactor data masking process * Improve qr code generation process * Increase minimum required node version to 0.10 * Add linter * Add tests and tests coverage * Update travis config to fix compilation issues * Add examples folder * Add missing license tag in package.json * Update build script and add sourcemap support * Publish only strictly needed files on npm * Update readme
14 lines
407 B
JavaScript
14 lines
407 B
JavaScript
var QRCode = require('../lib')
|
|
var fs = require('fs')
|
|
var util = require('util')
|
|
|
|
var path = './tmp.png'
|
|
|
|
QRCode.save(path, 'life of the party bros', function (error, written) {
|
|
if (error) {
|
|
console.log(error)
|
|
} else {
|
|
util.print(written === (fs.statSync(path) || {}).size ? 'PASS: written should be to the correct file\n' : 'FAIL: file should be written size\n')
|
|
fs.unlinkSync(path)
|
|
}
|
|
})
|