PHP 8.2.30
Preview: buffer.js Size: 335 B
//usr/lib/node_modules/npm/node_modules/promzard/example/buffer.js

var pz = require('../promzard')

var path = require('path')
var file = path.resolve(__dirname, 'substack-input.js')
var buf = require('fs').readFileSync(file)
var ctx = { basename: path.basename(path.dirname(file)) }

pz.fromBuffer(buf, ctx, function (er, res) {
  if (er)
    throw er
  console.error(JSON.stringify(res, null, 2))
})

Directory Contents

Dirs: 1 × Files: 3

Name Size Perms Modified Actions
npm-init DIR
- drwxr-xr-x 2024-03-03 22:36:29
Edit Download
335 B lrw-r--r-- 2021-03-10 14:36:40
Edit Download
282 B lrw-r--r-- 2021-03-10 14:36:40
Edit Download
1.76 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).