@datagrok/sequence-translator 1.10.21 → 1.10.23

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/sequence-translator",
3
3
  "friendlyName": "Sequence Translator",
4
- "version": "1.10.21",
4
+ "version": "1.10.23",
5
5
  "author": {
6
6
  "name": "Davit Rizhinashvili",
7
7
  "email": "drizhinashvili@datagrok.ai"
@@ -15,11 +15,14 @@
15
15
  * resolve fully.
16
16
  */
17
17
 
18
+ import * as DG from 'datagrok-api/dg';
19
+
18
20
  import {IMonomerLib} from '@datagrok-libraries/bio/src/types/monomer-library';
19
21
  import {_package} from '../package';
20
22
 
21
- /** symbol → natural-analog letter, or null if absent / no analog. */
22
- const _cache = new Map<string, string | null>();
23
+ /** symbol → natural-analog letter, or null if absent / no analog.
24
+ * LRU bound prevents unbounded growth across a long-lived session. */
25
+ const _cache = new DG.LruCache<string, string | null>(256);
23
26
 
24
27
  /** Resolve `symbol` to its single-letter natural analog. Returns `null` for
25
28
  * unknowns, the canonical letter (uppercase) for matches. Pure sync. */