@berish/rfp
Version:
Binary secure transport organization protocol for peer communication using function fingerprints
18 lines • 895 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeRemoteChange = void 0;
const linq_1 = __importDefault(require("@berish/linq"));
const stateful_1 = require("@berish/stateful");
function removeRemoteChange(store, props, newValue) {
const privateScope = stateful_1.getPrivateScope(store);
const isExists = privateScope.remoteChanges.some((m) => linq_1.default.from(m[0]).equalsValues(props) && m[1] === newValue);
if (isExists) {
privateScope.remoteChanges = privateScope.remoteChanges.filter((m) => !(linq_1.default.from(m[0]).equalsValues(props) && m[1] === newValue));
}
return isExists;
}
exports.removeRemoteChange = removeRemoteChange;
//# sourceMappingURL=removeRemoteChange.js.map