test-filesystem 1.1.1 → 1.2.0
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 +12 -0
- package/browser/test-fs.js +208 -91
- package/browser/test-fs.min.js +1 -1
- package/dist/functions/fileExists.d.ts +8 -0
- package/dist/functions/fileExists.js +23 -0
- package/dist/functions/fileExists.min.js +1 -0
- package/dist/functions/fileExists.min.mjs +1 -0
- package/dist/functions/fileExists.mjs +16 -0
- package/dist/functions/setUp.js +2 -1
- package/dist/functions/setUp.min.js +1 -1
- package/dist/functions/setUp.min.mjs +1 -1
- package/dist/functions/setUp.mjs +3 -2
- package/dist/main.d.ts +2 -0
- package/dist/main.js +13 -0
- package/dist/main.min.js +1 -1
- package/dist/main.min.mjs +1 -1
- package/dist/main.mjs +3 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -58,6 +58,7 @@ An assortment of objects that can be used in tests and some functions to help de
|
|
|
58
58
|
* [.exports.createTempDir()](#module_test-fs.exports.createTempDir) ⇒ <code>Promise.<(\*\|void)></code>
|
|
59
59
|
* [.removeDirectory(dirPath)](#module_test-fs.removeDirectory) ⇒ <code>Promise.<\*></code>
|
|
60
60
|
* [.logObject(object, [label], [outputType])](#module_test-fs.logObject) ⇒ <code>string</code> \| <code>undefined</code>
|
|
61
|
+
* [.fileExists(filePath)](#module_test-fs.fileExists) ⇒ <code>boolean</code>
|
|
61
62
|
* [.countMatches(content, search)](#module_test-fs.countMatches) ⇒ <code>number</code>
|
|
62
63
|
|
|
63
64
|
<a name="module_test-fs.nodeTree"></a>
|
|
@@ -149,6 +150,17 @@ Log out an object in a nicely formatted way.
|
|
|
149
150
|
| [label] | <code>string</code> | <code>"logging"</code> |
|
|
150
151
|
| [outputType] | <code>string</code> | <code>"log"</code> |
|
|
151
152
|
|
|
153
|
+
<a name="module_test-fs.fileExists"></a>
|
|
154
|
+
|
|
155
|
+
### test-fs.fileExists(filePath) ⇒ <code>boolean</code>
|
|
156
|
+
Detect if a file exists and is usable.
|
|
157
|
+
|
|
158
|
+
**Kind**: static method of [<code>test-fs</code>](#module_test-fs)
|
|
159
|
+
|
|
160
|
+
| Param | Type |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| filePath | <code>string</code> |
|
|
163
|
+
|
|
152
164
|
<a name="module_test-fs.countMatches"></a>
|
|
153
165
|
|
|
154
166
|
### test-fs.countMatches(content, search) ⇒ <code>number</code>
|