Socket
Socket
Sign inDemoInstall

write-json-file

Package Overview
Dependencies
6
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

8

index.d.ts

@@ -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"
]
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc