Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
create(subpath) {
const resultPath = path.join(uniqueDir, subpath, uid2(6));
mkdirp.sync(resultPath);
return resultPath;
},
remove() {export default function tmpdir() {
const uniqueDir = path.join(osTmpdir(), uid2(20));
return {
create(subpath) {
const resultPath = path.join(uniqueDir, subpath, uid2(6));
mkdirp.sync(resultPath);
return resultPath;
},
remove() {
return del(uniqueDir);
}
};
}frame(frame, fn){
let file = join(tmpdir(), uid(8) + '.png');
this.call('frame', [frame, file]);
this.once('frame', function(){
readFile(file, (err, buf) => {
if (err) return this.emit('error', err);
fn(buf);
unlink(file);
});
});
}static generateSessionId (header){
if(!header){
return uid(24);
}else{
return header+":"+uid(24);
}
}static generateSessionId (header){
if(!header){
return uid(24);
}else{
return header+":"+uid(24);
}
}updateAccessToken() {
this.accessToken = uid(256);
},