write-json-file
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -1,4 +0,4 @@ | ||
export type Replacer = (key: string, value: any) => void; | ||
export type Replacer = (key: string, value: any) => number | string | boolean | object | null | undefined; | ||
export type SortKeys = (a: string, b: string) => number; | ||
export type JSONStringifyable = object | number | string; | ||
export type JSONStringifyable = object | number | string | boolean; | ||
@@ -42,6 +42,6 @@ export interface Options { | ||
* @example | ||
* | ||
* import * as writeJsonFile from 'write-json-file'; | ||
* | ||
* writeJsonFile.sync('foo.json', {foo: true}); | ||
* console.log('done'); | ||
*/ | ||
@@ -56,2 +56,3 @@ export function sync(filepath: string, data: JSONStringifyable, options?: Options): void; | ||
* @example | ||
* | ||
* import writeJsonFile from 'write-json-file'; | ||
@@ -61,5 +62,4 @@ * | ||
* await writeJsonFile('foo.json', {foo: true}); | ||
* console.log('done'); | ||
* })(); | ||
*/ | ||
export default function writeJsonFile(filepath: string, data: JSONStringifyable, options?: Options): Promise<void>; |
{ | ||
"name": "write-json-file", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Stringify and write JSON to a file atomically", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava" | ||
"test": "xo && ava && tsd-check" | ||
}, | ||
@@ -48,2 +48,3 @@ "files": [ | ||
"tempfile": "^2.0.0", | ||
"tsd-check": "^0.1.0", | ||
"xo": "*" | ||
@@ -53,5 +54,5 @@ }, | ||
"ignores": [ | ||
"index.d.ts" | ||
"*.ts" | ||
] | ||
} | ||
} |
7327
4