nv-buf-storage 2.1.3 → 2.1.4

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.
Files changed (2) hide show
  1. package/mthds/cmmn.js +11 -8
  2. package/package.json +2 -2
package/mthds/cmmn.js CHANGED
@@ -520,9 +520,7 @@ function _write_need_algn_typed_array(ta) {
520
520
  function wbuf(buf) {return this._write_no_need_algn_typed_array(buf);}
521
521
  //
522
522
 
523
- function w_abvw(v) {
524
- var tnm = _tname.tya(v);
525
- var tenum = _tname.nm2em(tnm);
523
+ function _w_tenum_abvw(tenum,tnm,v) {
526
524
  if(v.byteLength >0) {
527
525
  var [vsi,vei] = this["w"+tnm](v);
528
526
  if(vei !==0) {
@@ -535,6 +533,12 @@ function w_abvw(v) {
535
533
  }
536
534
  }
537
535
 
536
+ function w_abvw(v) {
537
+ var tnm = _tname.tya(v);
538
+ var tenum = _tname.nm2em(tnm);
539
+ return this._w_tenum_abvw(tenum,tnm,v);
540
+ }
541
+
538
542
  async function _write(v) {
539
543
  if(ArrayBuffer.isView(v)) { return this.w_abvw(v);//TypedArray | Buffer
540
544
  } else if(_tname.UNTFS0_TO_EM.has(v)) { return [_tname.UNTFS0_TO_EM.get(v),0,0];
@@ -624,13 +628,12 @@ async function _w_tenum_v(tenum,v) {
624
628
  if(vei !== 0) { return [tenum,vsi,vei] } else { return [0,0,0]}
625
629
  }
626
630
  } else if(_tname.ST.EM.mp_st_rgx_primo_err_ablike_bi.has(tenum)) { var [vsi,vei] = this.wo(v); if(vei !== 0) { return [tenum,vsi,vei] } else { return [0,0,0]}
627
- } else if(_tname.ST.EM.abvw.has(tenum)) { return this.w_abvw(v);//TypedArray | Buffer
628
- } else if(tnm === "mts") { var [vsi,vei] = this.wf64(v.getTime());if(vei !== 0) {return [tenum,vsi,vei]} else {return [0,0,0]}
631
+ } else if(_tname.ST.EM.abvw.has(tenum)) { return this._w_tenum_abvw(tenum,tnm,v);//TypedArray | Buffer
632
+ } else if(_tname.ST.EM.untfs0.has(tenum)) { return [tenum,0,0];
633
+ } else if(tnm === "dt") { var [vsi,vei] = this.wf64(v.getTime());if(vei !== 0) {return [_tname.nm2em("mts"),vsi,vei]} else {return [0,0,0]}
629
634
  } else if(tnm === "s") { var [vsi,vei] = this.wstr(v); if(vei !== 0) { return [tenum,vsi,vei] } else { return [0,0,0]}
630
635
  } else if(typnm === "number") { var [vsi,vei] = this.wf64(v); if(vei !== 0) { return [tenum,vsi,vei] } else { return [0,0,0]}
631
- } else if(_tname.ST.EM.untfs0.has(tenum)) { return [tenum,0,0];
632
636
  } else if(typnm === "symbol") {
633
- var tnm = _tname.sym(v);
634
637
  if(tnm === "gy") {
635
638
  v = v.description;
636
639
  } else if(tnm === "ly_wn") {
@@ -943,7 +946,7 @@ module.exports = {
943
946
  werrerr:wo,waggerr:wo,wevlerr:wo,wrngerr:wo,wreferr:wo,wurierr:wo,wtyperr:wo,wstxerr:wo,
944
947
  wa:wo,wd:wo,wab:wo,wsab:wo,
945
948
  ////
946
- w_abvw,
949
+ w_abvw,_w_tenum_abvw,
947
950
  _write,
948
951
  ////
949
952
  r_tenum_key,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nv-buf-storage",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -16,7 +16,7 @@
16
16
  "nv-facutil-slct-ta": "^1.1.0",
17
17
  "nv-file-read2": "^1.0.2",
18
18
  "nv-file-write2": "^1.0.11",
19
- "nv-type-name": "^2.0.2"
19
+ "nv-type-name": "^2.0.6"
20
20
  },
21
21
  "devDependencies": {
22
22
  "nv-random-bufvw": "^1.0.4",