nv-buf-storage 1.3.4 → 1.3.5

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,6 +1,6 @@
1
1
  {
2
2
  "name": "nv-buf-storage",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -12,11 +12,13 @@
12
12
  "nv-buf-free-list2": "^1.2.1",
13
13
  "nv-buf-resize-util": "^1.0.0",
14
14
  "nv-buf-serde": "^1.0.0",
15
- "nv-facutil-slct-ta": "^1.0.10",
15
+ "nv-facutil-slct-ta": "^1.1.0",
16
16
  "nv-file-read2": "^1.0.2",
17
- "nv-file-write2": "^1.0.11"
17
+ "nv-file-write2": "^1.0.11",
18
+ "nv-type-name": "^1.1.1"
18
19
  },
19
20
  "devDependencies": {
21
+ "nv-buf-cmp": "^1.0.1",
20
22
  "nv-random-bufvw": "^1.0.4",
21
23
  "nv-random-date": "^1.0.1",
22
24
  "nv-random-rgx": "^1.0.0",
package/util.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const {get_cls_from_dump_fst_byte} = require("nv-facutil-slct-ta");
2
+ const {PRE_LOAD_BYTSZ} = require("./const");
2
3
 
3
4
  const creat_sz_buf_for_dump = (sz)=>{
4
5
  var f64a = new Float64Array(1);
@@ -19,7 +20,6 @@ const sync_read_segment_from_file = (src,si,sz,_fs)=>{
19
20
  return buf;
20
21
  }
21
22
 
22
- const PRE_LOAD_BYTSZ = 8 + 8*9 +8;
23
23
  const read_preload_info = (src,_fs)=>{
24
24
  var buf;
25
25
  if(typeof(src)==="string") {
@@ -50,7 +50,7 @@ const read_brief_info_from_dump = (src,_fs)=>{
50
50
  is_data_compressed: (datasz < max_alocable_unit_cnt_v),
51
51
  }
52
52
  }
53
- const _COND_IS_NODE_ENV = typeof globalThis.process === "object" && typeof require === "function";
53
+ const is_g = (o)=> o[Symbol.toStringTag] === "Generator" || o[Symbol.toStringTag] === "AyncGenerator";
54
54
 
55
55
  module.exports = {
56
56
  PRE_LOAD_BYTSZ,
@@ -59,5 +59,5 @@ module.exports = {
59
59
  sync_read_segment_from_file,
60
60
  read_preload_info,
61
61
  read_brief_info_from_dump,
62
- _COND_IS_NODE_ENV,
62
+ is_g,
63
63
  }