@stdlib/fs-read-json 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2023 The Stdlib Authors.
1
+ Copyright (c) 2016-2024 The Stdlib Authors.
package/README.md CHANGED
@@ -206,7 +206,7 @@ See [LICENSE][stdlib-license].
206
206
 
207
207
  ## Copyright
208
208
 
209
- Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
209
+ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
210
210
 
211
211
  </section>
212
212
 
@@ -219,8 +219,8 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
219
219
  [npm-image]: http://img.shields.io/npm/v/@stdlib/fs-read-json.svg
220
220
  [npm-url]: https://npmjs.org/package/@stdlib/fs-read-json
221
221
 
222
- [test-image]: https://github.com/stdlib-js/fs-read-json/actions/workflows/test.yml/badge.svg?branch=v0.1.1
223
- [test-url]: https://github.com/stdlib-js/fs-read-json/actions/workflows/test.yml?query=branch:v0.1.1
222
+ [test-image]: https://github.com/stdlib-js/fs-read-json/actions/workflows/test.yml/badge.svg?branch=v0.2.1
223
+ [test-url]: https://github.com/stdlib-js/fs-read-json/actions/workflows/test.yml?query=branch:v0.2.1
224
224
 
225
225
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/fs-read-json/main.svg
226
226
  [coverage-url]: https://codecov.io/github/stdlib-js/fs-read-json?branch=main
@@ -243,8 +243,11 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
243
243
  [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
244
244
 
245
245
  [deno-url]: https://github.com/stdlib-js/fs-read-json/tree/deno
246
+ [deno-readme]: https://github.com/stdlib-js/fs-read-json/blob/deno/README.md
246
247
  [umd-url]: https://github.com/stdlib-js/fs-read-json/tree/umd
248
+ [umd-readme]: https://github.com/stdlib-js/fs-read-json/blob/umd/README.md
247
249
  [esm-url]: https://github.com/stdlib-js/fs-read-json/tree/esm
250
+ [esm-readme]: https://github.com/stdlib-js/fs-read-json/blob/esm/README.md
248
251
  [branches-url]: https://github.com/stdlib-js/fs-read-json/blob/main/branches.md
249
252
 
250
253
  [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/fs-read-json/main/LICENSE
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ # Security
2
+
3
+ > Policy for reporting security vulnerabilities.
4
+
5
+ See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security).
@@ -74,7 +74,7 @@ interface ReadJSON {
74
74
  * @param clbk - callback
75
75
  *
76
76
  * @example
77
- * var resolve = require( `path` ).resolve;
77
+ * var resolve = require( 'path' ).resolve;
78
78
  *
79
79
  * readJSON( resolve( __dirname, '..', 'package.json' ), 'utf-8', onJSON );
80
80
  *
@@ -85,7 +85,7 @@ interface ReadJSON {
85
85
  * console.dir( data );
86
86
  * }
87
87
  */
88
- ( file: string | Buffer | number, options: Options | string, clbk: Callback ): void; // tslint-disable-line max-line-length
88
+ ( file: string | Buffer | number, options: Options | string, clbk: Callback ): void;
89
89
 
90
90
  /**
91
91
  * Asynchronously reads a file as JSON.
@@ -94,7 +94,7 @@ interface ReadJSON {
94
94
  * @param clbk - callback
95
95
  *
96
96
  * @example
97
- * var resolve = require( `path` ).resolve;
97
+ * var resolve = require( 'path' ).resolve;
98
98
  *
99
99
  * readJSON( resolve( __dirname, '..', 'package.json' ), onJSON );
100
100
  *
@@ -118,8 +118,8 @@ interface ReadJSON {
118
118
  * @returns JSON or an error
119
119
  *
120
120
  * @example
121
- * var resolve = require( `path` ).resolve;
122
- * var instanceOf = require( `@stdlib/assert/instance-of` );
121
+ * var resolve = require( 'path' ).resolve;
122
+ * var instanceOf = require( '@stdlib/assert-instance-of' );
123
123
  *
124
124
  * var out = readJSON.sync( resolve( __dirname, '..', 'package.json' ) );
125
125
  * if ( instanceOf( out, Error ) ) {
@@ -127,7 +127,7 @@ interface ReadJSON {
127
127
  * }
128
128
  * console.dir( out );
129
129
  */
130
- sync( file: string | Buffer | number, options?: Options | string ): string | Error; // tslint-disable-line max-line-length
130
+ sync( file: string | Buffer | number, options?: Options | string ): string | Error;
131
131
  }
132
132
 
133
133
  /**
@@ -141,7 +141,7 @@ interface ReadJSON {
141
141
  * @param clbk - callback
142
142
  *
143
143
  * @example
144
- * var resolve = require( `path` ).resolve;
144
+ * var resolve = require( 'path' ).resolve;
145
145
  *
146
146
  * readJSON( resolve( __dirname, '..', 'package.json' ), 'utf-8', onJSON );
147
147
  *
@@ -153,8 +153,8 @@ interface ReadJSON {
153
153
  * }
154
154
  *
155
155
  * @example
156
- * var resolve = require( `path` ).resolve;
157
- * var instanceOf = require( `@stdlib/assert/instance-of` );
156
+ * var resolve = require( 'path' ).resolve;
157
+ * var instanceOf = require( '@stdlib/assert-instance-of' );
158
158
  *
159
159
  * var out = readJSON.sync( resolve( __dirname, '..', 'package.json' ) );
160
160
  * if ( instanceOf( out, Error ) ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/fs-read-json",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Read a file as JSON.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -15,19 +15,12 @@
15
15
  ],
16
16
  "main": "./lib",
17
17
  "directories": {
18
- "benchmark": "./benchmark",
19
18
  "doc": "./docs",
20
- "example": "./examples",
21
19
  "lib": "./lib",
22
- "test": "./test"
20
+ "dist": "./dist"
23
21
  },
24
22
  "types": "./docs/types",
25
- "scripts": {
26
- "test": "make test",
27
- "test-cov": "make test-cov",
28
- "examples": "make examples",
29
- "benchmark": "make benchmark"
30
- },
23
+ "scripts": {},
31
24
  "homepage": "https://stdlib.io",
32
25
  "repository": {
33
26
  "type": "git",
@@ -37,25 +30,17 @@
37
30
  "url": "https://github.com/stdlib-js/stdlib/issues"
38
31
  },
39
32
  "dependencies": {
40
- "@stdlib/assert-instance-of": "^0.1.1",
41
- "@stdlib/assert-is-function": "^0.1.1",
42
- "@stdlib/assert-is-plain-object": "^0.1.1",
43
- "@stdlib/assert-is-string": "^0.1.1",
44
- "@stdlib/fs-read-file": "^0.1.1",
45
- "@stdlib/string-format": "^0.1.1",
46
- "@stdlib/string-remove-utf8-bom": "^0.1.1",
47
- "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1",
48
- "@stdlib/utils-parse-json": "^0.1.1",
49
- "@stdlib/error-tools-fmtprodmsg": "^0.1.0"
50
- },
51
- "devDependencies": {
52
- "@stdlib/assert-is-browser": "^0.1.0",
53
- "@stdlib/bench": "^0.1.0",
54
- "@stdlib/utils-noop": "^0.1.1",
55
- "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
56
- "istanbul": "^0.4.1",
57
- "tap-min": "git+https://github.com/Planeshifter/tap-min.git"
33
+ "@stdlib/assert-instance-of": "^0.2.1",
34
+ "@stdlib/assert-is-function": "^0.2.1",
35
+ "@stdlib/assert-is-plain-object": "^0.2.1",
36
+ "@stdlib/assert-is-string": "^0.2.1",
37
+ "@stdlib/fs-read-file": "^0.2.1",
38
+ "@stdlib/string-format": "^0.2.1",
39
+ "@stdlib/string-remove-utf8-bom": "^0.2.1",
40
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1",
41
+ "@stdlib/utils-parse-json": "^0.2.1"
58
42
  },
43
+ "devDependencies": {},
59
44
  "engines": {
60
45
  "node": ">=0.10.0",
61
46
  "npm": ">2.7.0"
package/CITATION.cff DELETED
@@ -1,30 +0,0 @@
1
- cff-version: 1.2.0
2
- title: stdlib
3
- message: >-
4
- If you use this software, please cite it using the
5
- metadata from this file.
6
-
7
- type: software
8
-
9
- authors:
10
- - name: The Stdlib Authors
11
- url: https://github.com/stdlib-js/stdlib/graphs/contributors
12
-
13
- repository-code: https://github.com/stdlib-js/stdlib
14
- url: https://stdlib.io
15
-
16
- abstract: |
17
- Standard library for JavaScript and Node.js.
18
-
19
- keywords:
20
- - JavaScript
21
- - Node.js
22
- - TypeScript
23
- - standard library
24
- - scientific computing
25
- - numerical computing
26
- - statistical computing
27
-
28
- license: Apache-2.0 AND BSL-1.0
29
-
30
- date-released: 2016