Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const uncompressedSteps = compressedStepsJSON.map((compressedStepJSON)=> {
return Step.fromJSON(this.view.state.schema, uncompressStepJSON(compressedStepJSON));
});
steps.push(...uncompressedSteps);
const uncompressedSteps = compressedStepsJSON.map((compressedStepJSON) => {
return Step.fromJSON(
this.view.state.schema,
uncompressStepJSON(compressedStepJSON),
);
});
steps.push(...uncompressedSteps);
const fixedSteps = hydratedSteps.map((step) => {
return Step.fromJSON(schema, step.toJSON());
});
const adjustedSteps = adjustSteps2(empty, schema, fixedSteps, divergeKey);
let tr = receiveTransaction(this.state.edit, data.steps.map(j => Step.fromJSON(EditorSchema, j)), data.clientIDs)
this.dispatch({type: "transaction", transaction: tr, requestDone: true})
const steps = [diff].map(jIndex => Step.fromJSON(pubSchema, jIndex));
const clientIds = [diff].map(jIndex => jIndex.client_id);
function compressedStepJSONToStep(compressedStepJSON) {
return Step.fromJSON(view.state.schema, uncompressStepJSON(compressedStepJSON)) }
const steps = Object.values(compressedStepsJson).map((stepJson) => {
const uncompressedStepsJson = uncompressStepJSON(stepJson);
return Step.fromJSON(editorSchema, uncompressedStepsJson);
});
return new Change(steps, clientId, timestamp, draftBranchId);
steps.map(step => Step.fromJSON(schema, step)),
steps.map(step => step.clientID),
const newSteps = compressedStepsJSON.map((compressedStepJSON) => {
return Step.fromJSON(
this.view.state.schema,
uncompressStepJSON(compressedStepJSON),
);
});
const newStepsClientIds = new Array(newSteps.length).fill(clientId);
const steps = compressedSteps.map((cs) =>
Step.fromJSON(prosemirrorSchema, uncompressStepJSON(cs)),
);