1.0.11 • Published 11 months ago

nv-facutil-value-table v1.0.11

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

nv-facutil-value-table

  • a value table for most data-types of JS
  • serde using

install

  • npm install nv-facutil-value-table

splitted

usage

  const {
     V, ODD, N, BI,S,
     PRIMO, TRUO,FLSO,NUMOS,STROS,
     Y,  DT,RGX, 
     ABLIKE, ABVW,
     ERR,
  }   = require("nv-facutil-value-table");

example

odd

        [undefined, null, true,false]

number

	 [
	    5e-324,
	    1.7976931348623157e+308,
	    -9007199254740991,
	    9007199254740991,
	    -1,
	    -0,
	    0,
	    1,
	    Infinity,
                NaN,
	    -Infinity,
	    1.1
	  ]

bigint

	 [
	    -1n,
	    0n,
	    1n,
	    18446744073709551615n,
	    -18446744073709551616n,
	    18446744073709551616n
	  ]

string

             [ '\b\t\n\\x0b\f\r', 'aÿ我𝑒' ]

primo

	[
	    [Boolean: true],
	    [Boolean: false],
	    [Number: 5e-324],
	    [Number: 1.7976931348623157e+308],
	    [Number: -9007199254740991],
	    [Number: 9007199254740991],
	    [Number: -1],
	    [Number: -0],
	    [Number: 0],
	    [Number: 1],
	    [Number: Infinity],
	    [Number: NaN],
	    [Number: -Infinity],
	    [Number: 1.1],
	    [String: '\b\t\n\\x0b\f\r'],
	    [String: 'aÿ我𝑒']
	]

symbol

  [ 
      Symbol(),             //using Symbol()            .description === undefined               #0
      Symbol(),             //using Symbol("")          .description === ""
      Symbol(sym),
      Symbol(undefined),    // using Symbol.for()       .description === "undefined"             #1
      Symbol()              // using Symbol.for("")     .description === ""    
  ]


  // #0  AND #1  could be used to partly judge if a symbol is created using .for 

date

  [
    +275760-09-13T00:00:00.000Z,           // new Date(1000*3600*24*100000000)
    2023-06-07T13:48:47.862Z,
    -271821-04-20T00:00:00.000Z            // new Date(-1000*3600*24* 100_000_000)
  ]

regexp

        [ /./, /.*/gi ]

array-buffer OR share-array-buffer

	  [
	    ArrayBuffer { [Uint8Contents]: <00>, byteLength: 1 },
	    ArrayBuffer { [Uint8Contents]: <00>, byteLength: 1 },
	    SharedArrayBuffer { [Uint8Contents]: <00>, byteLength: 1 },
	    SharedArrayBuffer { [Uint8Contents]: <00>, byteLength: 1 }
	  ]

array-buffer-view

	 [
	    DataView { byteLength: 1, byteOffset: 0, buffer: [ArrayBuffer] },
	    Uint8Array(1) [ 0 ],
	    Uint8ClampedArray(1) [ 0 ],
	    Int8Array(1) [ 0 ],
	    Uint16Array(1) [ 0 ],
	    Int16Array(1) [ 0 ],
	    Uint32Array(1) [ 0 ],
	    Int32Array(1) [ 0 ],
	    BigUint64Array(1) [ 0n ],
	    BigInt64Array(1) [ 0n ],
	    Float32Array(1) [ 0 ],
	    Float64Array(1) [ 0 ]
	  ]

error

		const ERR = [
		    new EvalError("evl"),
		    new RangeError("rng"),
		    new ReferenceError("ref"),
		    new URIError("uri"),
		    new TypeError("typ"),
		    new Error("err",{cause:"cause"})
		];

		ERR.push(new AggregateError(ERR.slice(0,5),"agg"));

value

			{
			  V: [
			    undefined,
			    null,
			    true,
			    false,
			    '',
			    0,
			    -Infinity,
			    Infinity,
			    NaN,
			    Symbol(),
			    0n,
			    /^$/g,
			    2023-06-04T18:43:28.444Z,
			    [Boolean: true],
			    [Boolean: false],
			    [String: ''],
			    [Number: 0],
			    [],
			    Map(0) {},
			    Set(0) {},
			    ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 },
			    DataView { byteLength: 0, byteOffset: 0, buffer: [ArrayBuffer] },
			    Uint8Array(0) [],
			    Uint8ClampedArray(0) [],
			    Int8Array(0) [],
			    Uint16Array(0) [],
			    Int16Array(0) [],
			    Uint32Array(0) [],
			    Int32Array(0) [],
			    BigUint64Array(0) [],
			    BigInt64Array(0) [],
			    Float32Array(0) [],
			    Float64Array(0) [],
			    WeakMap { <items unknown> },
			    WeakSet { <items unknown> },
			    WeakRef {},
			    [Function: sfunc],
			    [AsyncFunction: afunc],
			    [GeneratorFunction: sgen],
			    [AsyncGeneratorFunction: agen],
			    [Function: slmbd],
			    [AsyncFunction: almbd],
			    [class Klass],
			    [Function: smthd],
			    [AsyncFunction: amthd],
			    [GeneratorFunction: sgen_mthd],
			    [AsyncGeneratorFunction: agen_mthd],
			    Promise {
			      0,
			      [Symbol(async_id_symbol)]: 31,
			      [Symbol(trigger_async_id_symbol)]: 5
			    },
			    Object [Generator] {},
			    Object [AsyncGenerator] {},
			    Proxy [ {}, {} ],
			    {}
			  ]
			}

METHODS

APIS

LICENSE

  • ISC
1.0.11

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago