nv-facutil-slct-ta 1.1.1 → 1.1.2

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/index.js +24 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -390,6 +390,28 @@ const ele_tbrief_to_tacls = (t)=>ELE_TBRIEF_TO_TACLS[t];
390
390
  const tacls_to_ele_tbrief = (Cls)=>TACLS_TO_ELE_TBRIEF.get(Cls);
391
391
 
392
392
 
393
+ const max_tacls = (...Clss) => {
394
+ let max = Clss[0];
395
+ for (let i = 1; i < Clss.length; i++) {
396
+ let c = Clss[i];
397
+ if (c.BYTES_PER_ELEMENT > max.BYTES_PER_ELEMENT) {
398
+ max = c;
399
+ }
400
+ }
401
+ return max;
402
+ };
403
+
404
+ const min_tacls = (...Clss) => {
405
+ let min = Clss[0];
406
+ for (let i = 1; i < Clss.length; i++) {
407
+ let c = Clss[i];
408
+ if (c.BYTES_PER_ELEMENT < min.BYTES_PER_ELEMENT) {
409
+ min = c;
410
+ }
411
+ }
412
+ return min;
413
+ };
414
+
393
415
  module.exports = {
394
416
  tcate,
395
417
  ////
@@ -441,4 +463,6 @@ module.exports = {
441
463
  ////
442
464
  ele_tbrief_to_tacls,
443
465
  tacls_to_ele_tbrief,
466
+ ////
467
+ min_tacls,max_tacls
444
468
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nv-facutil-slct-ta",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"