mirror of
https://github.com/Brandon-Rozek/Rozbot.git
synced 2024-11-07 20:30:34 -05:00
13 lines
288 B
JavaScript
13 lines
288 B
JavaScript
var fs = require('fs');
|
|
var promise = require('promise-polyfill');
|
|
|
|
module.exports = function(file, data) {
|
|
return new promise(function(resolve, reject) {
|
|
fs.appendFile(file, data + "\n", function(error) {
|
|
if (error) {
|
|
console.log(error);
|
|
//reject(error);
|
|
}
|
|
});
|
|
});
|
|
}
|