@rkmodules/rules 0.0.88 → 0.0.89
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/dist/index.cjs.js
CHANGED
|
@@ -5563,7 +5563,15 @@ var useVariable = function (scope, name, initial, persist) {
|
|
|
5563
5563
|
var setValue = function (value) { return setVar(scope, name, value, persist); };
|
|
5564
5564
|
return [value, setValue];
|
|
5565
5565
|
};
|
|
5566
|
+
var getVariable = function (scope, name, persist) {
|
|
5567
|
+
if (persist === void 0) { persist = true; }
|
|
5568
|
+
var value = variableStore.getState().getVar(scope, name, persist);
|
|
5569
|
+
return value;
|
|
5570
|
+
};
|
|
5566
5571
|
|
|
5572
|
+
function getPositions(fn) {
|
|
5573
|
+
return getVariable("rules", "".concat(fn.name, ".positions"), true);
|
|
5574
|
+
}
|
|
5567
5575
|
function usePositions(fn) {
|
|
5568
5576
|
return useVariable("rules", "".concat(fn.name, ".positions"), {});
|
|
5569
5577
|
}
|
|
@@ -6967,8 +6975,10 @@ exports.broadCast = broadCast;
|
|
|
6967
6975
|
exports.expandTree = expandTree;
|
|
6968
6976
|
exports.getBranch = getBranch;
|
|
6969
6977
|
exports.getPaths = getPaths;
|
|
6978
|
+
exports.getPositions = getPositions;
|
|
6970
6979
|
exports.getReferences = getReferences;
|
|
6971
6980
|
exports.getValue = getValue$1;
|
|
6981
|
+
exports.getVariable = getVariable;
|
|
6972
6982
|
exports.graftTree = graftTree;
|
|
6973
6983
|
exports.hasReference = hasReference;
|
|
6974
6984
|
exports.interpolate = interpolate;
|
|
@@ -6995,4 +7005,5 @@ exports.useFunction = useFunction;
|
|
|
6995
7005
|
exports.usePositions = usePositions;
|
|
6996
7006
|
exports.useUpdatePositions = useUpdatePositions;
|
|
6997
7007
|
exports.useVariable = useVariable;
|
|
7008
|
+
exports.variableStore = variableStore;
|
|
6998
7009
|
//# sourceMappingURL=index.cjs.js.map
|