Download source/src/training/editProvenance.js from FormaLau/microduck-reachy-simulator: direct link, hf CLI and curl.
- Browser
- Download file 354 Bytes
-
https://huggingface.co/spaces/FormaLau/microduck-reachy-simulator/resolve/main/source/src/training/editProvenance.js
- Command line
-
hf download hf://spaces/FormaLau/microduck-reachy-simulator/source/src/training/editProvenance.js
-
curl -L -o editProvenance.js https://huggingface.co/spaces/FormaLau/microduck-reachy-simulator/resolve/main/source/src/training/editProvenance.js
354 Bytes
| // The editor inserts its own text (Enter, Tab, Ctrl+F reindent) through | |
| // execCommand. Mark those edits so the assessment journal does not report | |
| // them as text inserted by another tool. | |
| let ownEdits = 0; | |
| export function asOwnEdit(edit) { | |
| ownEdits++; | |
| try { return edit(); } finally { ownEdits--; } | |
| } | |
| export const isOwnEdit = () => ownEdits > 0; | |