Download src/lib/format.js from soiz1/s4s-paint: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/datasets/soiz1/s4s-paint/resolve/main/src/lib/format.js
- Command line
-
hf download hf://datasets/soiz1/s4s-paint/src/lib/format.js
-
curl -L -o format.js https://huggingface.co/datasets/soiz1/s4s-paint/resolve/main/src/lib/format.js
549 Bytes
| import keyMirror from 'keymirror'; | |
| const Formats = keyMirror({ | |
| BITMAP: null, | |
| VECTOR: null, | |
| // Format changes which should not trigger conversions, for instance undo | |
| BITMAP_SKIP_CONVERT: null, | |
| VECTOR_SKIP_CONVERT: null | |
| }); | |
| const isVector = function (format) { | |
| return format === Formats.VECTOR || format === Formats.VECTOR_SKIP_CONVERT; | |
| }; | |
| const isBitmap = function (format) { | |
| return format === Formats.BITMAP || format === Formats.BITMAP_SKIP_CONVERT; | |
| }; | |
| export { | |
| Formats as default, | |
| isVector, | |
| isBitmap | |
| }; | |