@randajan/jet-base
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -143,6 +143,10 @@ // src/index.js | ||
}; | ||
var addWatch = (base, path, fce) => { | ||
var addWatch = (base, path, fce, initRun = false) => { | ||
[path, fce] = formatDutyArgs(path, fce); | ||
const get2 = (p) => base.get([path, p]); | ||
if (initRun) { | ||
setTimeout((_) => fce(get2, (_2) => [])); | ||
} | ||
return addDuty(use(base), "watches", path, (cngs) => { | ||
fce((p) => base.get([path, p]), (_) => filterChanges(path, cngs)); | ||
fce(get2, (_) => filterChanges(path, cngs)); | ||
}); | ||
@@ -205,4 +209,4 @@ }; | ||
} | ||
watch(path, fce) { | ||
return addWatch(this, path, fce); | ||
watch(path, fce, initRun = false) { | ||
return addWatch(this, path, fce, initRun); | ||
} | ||
@@ -209,0 +213,0 @@ fit(path, fce) { |
{ | ||
"name": "@randajan/jet-base", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Ecosystem of types and related usefull tools.", | ||
@@ -21,3 +21,3 @@ "repository": "randajan/jet-base", | ||
"peerDependencies": { | ||
"@randajan/jet-core": "3.0.2" | ||
"@randajan/jet-core": "^3.0.3" | ||
}, | ||
@@ -24,0 +24,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
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
24336
238