mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
9 lines
296 B
JavaScript
9 lines
296 B
JavaScript
var tmp = require("./index.js");
|
|
var Promise = require("bluebird"); // just for delay, this works with native promises
|
|
// disposer
|
|
tmp.withFile((path) => {
|
|
console.log("Created at path", path);
|
|
return Promise.delay(1000);
|
|
}).then(() => {
|
|
console.log("File automatically disposed");
|
|
}); |