Skip to content

realglobe-Inc/pon-writer

Repository files navigation

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