npm.io
1.0.7 • Published 6 years ago

pon-writer

Licence
Apache-2.0
Version
1.0.7
Deps
1
Size
168 kB
Vulns
0
Weekly
0

Title Banner

Build Status npm Version JS Standard

File writer for pon

Installation

$ npm install pon-writer --save

Usage

'use strict'

const ponWriter = require('pon-writer')

async function tryExample () {
  let writer = ponWriter({})

  let { skipped } = await writer.write('foo/bar.txt', 'This is the contents of bar!', {
    mkdirp: true,
    skipIfIdentical: true
  })
  if (!skipped) {
    console.log('New file generated!')
  }
}

tryExample().catch((err) => console.error(err))

API Guide

License

This software is released under the Apache-2.0 License.

Keywords