Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const XXHASH = require('xxhash')
console.log('test xxhash: ' + XXHASH.hash(Buffer.from('hello'), 1234))
}
if (xattrBase64) {
mkdirp.sync(dir)
let decode = Buffer.from(xattrBase64.toString(), 'base64')
fs.writeFileSync(path.join(dir, 'xattr.node'), decode)
// test xattr
const XATTR = require('fs-xattr')
XATTR.setSync(dir, 'user.foo', 'bar')
console.log('test xattr: ' + XATTR.getSync(dir, 'user.foo'))
XATTR.removeSync(dir, 'user.foo')
}
function loadFont (base64, name) {
if (base64)
return Buffer.from(base64, 'base64')
else
return fs.readFileSync('./public/stylesheets/Roboto-' + name + '-webfont.woff')
}
robotoThin = loadFont(robotoThinBase64, 'Thin')
robotoLight = loadFont(robotoLightBase64, 'Light')
robotoRegular = loadFont(robotoRegularBase64, 'Regular')
robotoMedium = loadFont(robotoMediumBase64, 'Medium')
robotoBold = loadFont(robotoBoldBase64, 'Bold')
robotoBlack = loadFont(robotoBlackBase64, 'Black')