Skip to content

Instantly share code, notes, and snippets.

@scripting
Last active August 25, 2022 02:42
Embed
What would you like to do?
Verbs for Electric Drummer
localfile = { //verbs for Electric Drummer
read: function (path) {
return new Promise (function (resolve, reject) {
fs.readFile (path, function (err, data) {
if (err) {
reject (err);
}
else {
resolve (data);
}
});
});
},
write: function (path, data) {
return new Promise (function (resolve, reject) {
fs.writeFile (path, data, function (err) {
if (err) {
reject (err);
}
else {
resolve (true);
}
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment