pon-writer

File writer for pon

Usage no npm install needed!

<script type="module">
  import ponWriter from 'https://cdn.skypack.dev/pon-writer';
</script>

README

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.

Links