edf2csv 0.8.16 → 0.8.17
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.
|
@@ -4,9 +4,15 @@
|
|
|
4
4
|
* Two kinds, and they fail differently. A control byte drives the terminal: `\x1b[2J\x1b[H`
|
|
5
5
|
* clears the screen and homes the cursor, which is enough to hide output or repaint it as
|
|
6
6
|
* something else. A bidirectional override does not drive it at all — it tells the terminal
|
|
7
|
-
* to display a run right to left and to keep doing so until the run closes, so
|
|
8
|
-
* `sleep
|
|
9
|
-
* on purpose, and in both cases what is shown is not what is there.
|
|
7
|
+
* to display a run right to left and to keep doing so until the run closes, so a file named
|
|
8
|
+
* `sleep-` then U+202E then `fdp.edf` arrives on screen as `sleep-fde.pdf`. Neither is a
|
|
9
|
+
* byte anyone types on purpose, and in both cases what is shown is not what is there.
|
|
10
|
+
*
|
|
11
|
+
* Named rather than written. This paragraph carried the override itself until 0.8.17, so
|
|
12
|
+
* every line after it in the file that defines the class rendered right to left in a
|
|
13
|
+
* terminal: the hazard, in the source that exists to keep it off a screen. The changelog
|
|
14
|
+
* had the same byte taken out of it twice, in the entries for 0.7.257 and 0.8.0, for the
|
|
15
|
+
* same reason and by the same rule: write the name, not the character.
|
|
10
16
|
*
|
|
11
17
|
* One class, in one place, because three callers need the same answer: `printable` escapes it
|
|
12
18
|
* before a path or a header field reaches the terminal, and the conversion asks whether an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unprintable.js","sourceRoot":"","sources":["../../src/format/unprintable.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"unprintable.js","sourceRoot":"","sources":["../../src/format/unprintable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,GAAG,8DAA8D,CAAC;AAEnF,6EAA6E;AAC7E,MAAM,UAAU,kBAAkB,CAAC,KAAK,GAAG,GAAG;IAC5C,OAAO,IAAI,MAAM,CAAC,IAAI,WAAW,GAAG,EAAE,KAAK,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,CAAW,CAAC;IAChD,OAAO,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AAC9F,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IACpC,KAAK,MAAM,SAAS,IAAI,IAAI;QAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;YAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/E,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;AACpB,CAAC","sourcesContent":["/**\n * Text that a terminal does not print as itself, and how it is shown instead.\n *\n * Two kinds, and they fail differently. A control byte drives the terminal: `\\x1b[2J\\x1b[H`\n * clears the screen and homes the cursor, which is enough to hide output or repaint it as\n * something else. A bidirectional override does not drive it at all — it tells the terminal\n * to display a run right to left and to keep doing so until the run closes, so a file named\n * `sleep-` then U+202E then `fdp.edf` arrives on screen as `sleep-fde.pdf`. Neither is a\n * byte anyone types on purpose, and in both cases what is shown is not what is there.\n *\n * Named rather than written. This paragraph carried the override itself until 0.8.17, so\n * every line after it in the file that defines the class rendered right to left in a\n * terminal: the hazard, in the source that exists to keep it off a screen. The changelog\n * had the same byte taken out of it twice, in the entries for 0.7.257 and 0.8.0, for the\n * same reason and by the same rule: write the name, not the character.\n *\n * One class, in one place, because three callers need the same answer: `printable` escapes it\n * before a path or a header field reaches the terminal, and the conversion asks whether an\n * annotation description carries any, since that column is the one piece of free text in the\n * output that can hold a character above U+00FF — header text is decoded latin1, so every\n * byte of it becomes a code point below U+0100.\n *\n * Not the bidi marks U+200E and U+200F, which reorder the neutral characters beside them\n * rather than a run, and which do turn up in ordinary names and event text written in Arabic\n * or Hebrew.\n */\nconst UNPRINTABLE = '\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u202a-\\\\u202e\\\\u2066-\\\\u2069';\n\n/** Fresh each time, because a `g` flag carries `lastIndex` between calls. */\nexport function unprintablePattern(flags = 'u'): RegExp {\n return new RegExp(`[${UNPRINTABLE}]`, flags);\n}\n\n/**\n * One character as its escape.\n *\n * `\\x` is two digits and `\\u` is four, so the wide ones take `\\u`: a reader who counts the\n * digits of `\\x202e` finds a different character.\n */\nexport function escapeCharacter(character: string): string {\n const code = character.codePointAt(0) as number;\n return code > 0xff ? `\\\\u${code.toString(16)}` : `\\\\x${code.toString(16).padStart(2, '0')}`;\n}\n\n/** Every distinct unprintable character in `text`, in the order they first appear. */\nexport function unprintableIn(text: string): string[] {\n const found = new Set<string>();\n const single = unprintablePattern();\n for (const character of text) if (single.test(character)) found.add(character);\n return [...found];\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edf2csv",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.17",
|
|
4
4
|
"description": "Convert EDF, EDF+ and BDF biosignal recordings (European Data Format) to CSV from the command line. Local, streaming, and never resamples or alters units.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"edf",
|