@thi.ng/file-io
Advanced tools
Comparing version 1.1.5 to 1.2.0
# Change Log | ||
- **Last updated**: 2024-01-23T15:58:27Z | ||
- **Last updated**: 2024-01-26T18:03:04Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -12,2 +12,12 @@ | ||
## [1.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/file-io@1.2.0) (2024-01-26) | ||
#### 🚀 Features | ||
- add fileWatcher() ([71c1d8f](https://github.com/thi-ng/umbrella/commit/71c1d8f)) | ||
#### ♻️ Refactoring | ||
- migrate internal predicates ([52c985a](https://github.com/thi-ng/umbrella/commit/52c985a)) | ||
## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/file-io@1.1.0) (2023-12-18) | ||
@@ -14,0 +24,0 @@ |
@@ -1,6 +0,5 @@ | ||
import { isFunction } from "@thi.ng/checks/is-function"; | ||
import { isString } from "@thi.ng/checks/is-string"; | ||
import { readdirSync, statSync } from "fs"; | ||
import { sep } from "path"; | ||
import { isDirectory } from "./dir.js"; | ||
import { __ensurePred } from "./internal/ensure.js"; | ||
const files = (dir, match = "", maxDepth = Infinity, logger) => __files(dir, match, logger, maxDepth, 0); | ||
@@ -42,4 +41,2 @@ function* __files(dir, match = "", logger, maxDepth = Infinity, depth = 0) { | ||
} | ||
const __ensureRegEx = (match) => isString(match) ? new RegExp(`${match.replace(/\./g, "\\.")}$`) : match; | ||
const __ensurePred = (match) => isFunction(match) ? match : (match = __ensureRegEx(match), (x) => match.test(x)); | ||
export { | ||
@@ -46,0 +43,0 @@ dirs, |
@@ -12,3 +12,4 @@ export * from "./delete.js"; | ||
export * from "./text.js"; | ||
export * from "./watch.js"; | ||
export * from "./write.js"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -12,2 +12,3 @@ export * from "./delete.js"; | ||
export * from "./text.js"; | ||
export * from "./watch.js"; | ||
export * from "./write.js"; |
{ | ||
"name": "@thi.ng/file-io", | ||
"version": "1.1.5", | ||
"version": "1.2.0", | ||
"description": "Assorted file I/O utils (with logging support) for NodeJS", | ||
@@ -38,7 +38,7 @@ "type": "module", | ||
"dependencies": { | ||
"@thi.ng/api": "^8.9.17", | ||
"@thi.ng/checks": "^3.4.17", | ||
"@thi.ng/hex": "^2.3.29", | ||
"@thi.ng/api": "^8.9.18", | ||
"@thi.ng/checks": "^3.4.18", | ||
"@thi.ng/hex": "^2.3.30", | ||
"@thi.ng/logger": "^2.1.4", | ||
"@thi.ng/random": "^3.6.24" | ||
"@thi.ng/random": "^3.6.25" | ||
}, | ||
@@ -112,2 +112,5 @@ "devDependencies": { | ||
}, | ||
"./watch": { | ||
"default": "./watch.js" | ||
}, | ||
"./write": { | ||
@@ -121,3 +124,3 @@ "default": "./write.js" | ||
}, | ||
"gitHead": "417b5a7ea7bd54a3b4f086fe0fc2ce8e8933c9b2\n" | ||
"gitHead": "7426e2ae6fca5482c6eaf649872296fc89955374\n" | ||
} |
@@ -48,3 +48,3 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
Package sizes (brotli'd, pre-treeshake): ESM: 1.30 KB | ||
Package sizes (brotli'd, pre-treeshake): ESM: 1.98 KB | ||
@@ -51,0 +51,0 @@ ## Dependencies |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37874
32
580
10
Updated@thi.ng/api@^8.9.18
Updated@thi.ng/checks@^3.4.18
Updated@thi.ng/hex@^2.3.30
Updated@thi.ng/random@^3.6.25