necessary 11.8.4 → 11.8.5
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/README.md +25 -25
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,9 +11,9 @@ These can only be used in the browser:
|
|
|
11
11
|
These cna only be used on Node:
|
|
12
12
|
|
|
13
13
|
* [Shell utilities](#shell-utilities)
|
|
14
|
-
* [Package utilities](#package-utilities)
|
|
15
14
|
* [Logging utilities](#logging-utilities)
|
|
16
15
|
* [Request utilities](#request-utilities)
|
|
16
|
+
* [Package utilities](#package-utilities)
|
|
17
17
|
* [File system utilities](#file-system-utilities)
|
|
18
18
|
* [Configuration utilities](#configuration-utilities)
|
|
19
19
|
|
|
@@ -177,30 +177,6 @@ If no `validateFunction` property is given then you must set a `validatePattern`
|
|
|
177
177
|
|
|
178
178
|
The `initialAnswer` property sets the initial answer at the prompt. You might want to set it to `yes`, for example. Lastly, setting the `answer` property to anything other than `null` or `undefined` causes the `callback` function to be invoked immediately without any prompt being shown. This can be useful for debugging.
|
|
179
179
|
|
|
180
|
-
## Package utilities
|
|
181
|
-
|
|
182
|
-
- `getName()`
|
|
183
|
-
- `getAuthor()`
|
|
184
|
-
- `getVersion()`
|
|
185
|
-
- `getLicense()`
|
|
186
|
-
- `getPackageJSON()`
|
|
187
|
-
|
|
188
|
-
A `getPackageJSON()` function for retrieving the contents of the `package.json` file together with a few helper functions to retrieve the more common entries.
|
|
189
|
-
|
|
190
|
-
* The `getName()`, `getAuthor()`, `getVersion()` and `getLicense()` functions return the value of the requisite entries in the `package.json` file.
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
const version = getVersion(); // Returns the package version.
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
From here the package's JSON can be destructured to recover specific entries not covered by the above helper functions.
|
|
197
|
-
|
|
198
|
-
* The `getPackageJSON()` function returns the contents of `pakcage.json` file in JSON form.
|
|
199
|
-
|
|
200
|
-
```
|
|
201
|
-
const packageJSON = getPackageJSON(); // Returns the contents of the package.json file.
|
|
202
|
-
```
|
|
203
|
-
|
|
204
180
|
## Logging utilities
|
|
205
181
|
|
|
206
182
|
- `log()`
|
|
@@ -334,6 +310,30 @@ function contentFromResponse(response, callback) {
|
|
|
334
310
|
|
|
335
311
|
* The `createPostRequest()` function is identical to the `createRequest()` function except that the `method` argument is omitted and the `headers` argument is optional.
|
|
336
312
|
|
|
313
|
+
## Package utilities
|
|
314
|
+
|
|
315
|
+
- `getName()`
|
|
316
|
+
- `getAuthor()`
|
|
317
|
+
- `getVersion()`
|
|
318
|
+
- `getLicense()`
|
|
319
|
+
- `getPackageJSON()`
|
|
320
|
+
|
|
321
|
+
A `getPackageJSON()` function for retrieving the contents of the `package.json` file together with a few helper functions to retrieve the more common entries.
|
|
322
|
+
|
|
323
|
+
* The `getName()`, `getAuthor()`, `getVersion()` and `getLicense()` functions return the value of the requisite entries in the `package.json` file.
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
const version = getVersion(); // Returns the package version.
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
From here the package's JSON can be destructured to recover specific entries not covered by the above helper functions.
|
|
330
|
+
|
|
331
|
+
* The `getPackageJSON()` function returns the contents of `pakcage.json` file in JSON form.
|
|
332
|
+
|
|
333
|
+
```
|
|
334
|
+
const packageJSON = getPackageJSON(); // Returns the contents of the package.json file.
|
|
335
|
+
```
|
|
336
|
+
|
|
337
337
|
## File system utilities
|
|
338
338
|
|
|
339
339
|
- `checkEntryExists()`
|