JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4025
  • Score
    100M100P100Q127521F
  • License MIT

Write formatted JSON to a file, and create parent directories if necessary.

Package Exports

  • write-json-safe

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (write-json-safe) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

write-json-safe

dependencies typescript npm

Write files, and create parent directories if necessary.

yarn add write-json-safe

API

import { writeJSON, writeJSONSync, JSONObject } from "write-json-safe";

writeJSONSync(path: string, content?: JSONObject, pretty = true) => void;

writeJSON(path: string, content?: JSONObject, pretty = true) => Promise<void>;