UNPKG

311 BJavaScriptView Raw
1'use strict'
2
3const writeout = require('writeout')
4
5// Generate a file.
6writeout('hello-wold', 'This is the contents text', {
7 mkdirp: true,
8 skipIfIdentical: true
9}).then((result) => {
10 if (!result.skipped) {
11 console.log('File generated:', result.filename)
12 }
13}).catch((err) =>
14 console.error(err)
15)
16