@bigbinary/neeto-molecules 4.1.21 → 4.1.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.
@@ -345,93 +345,86 @@ function requireIPv6Utils () {
345
345
 
346
346
  var HexadecimalUtils = {};
347
347
 
348
- var hasRequiredHexadecimalUtils;
349
-
350
- function requireHexadecimalUtils () {
351
- if (hasRequiredHexadecimalUtils) return HexadecimalUtils;
352
- hasRequiredHexadecimalUtils = 1;
353
- (function (exports$1) {
354
- Object.defineProperty(exports$1, "__esModule", { value: true });
355
- exports$1.hexadectetNotationToBinaryString = exports$1.binaryStringToHexadecimalString = exports$1.colonHexadecimalNotationToBinaryString = exports$1.hexadecimalStringToHexadecatetString = exports$1.hexadecimalStringToBinaryString = exports$1.bigIntToHexadecimalString = void 0;
356
- const IPv6Utils_1 = requireIPv6Utils();
357
- const BinaryUtils_1 = BinaryUtils;
358
- /**
359
- * Converts a given bigint number to a hexadecimal string
360
- * @param num the bigint number
361
- * @returns {string} the hexadeciaml string
362
- */
363
- let bigIntToHexadecimalString = (num) => {
364
- return num.toString(16);
365
- };
366
- exports$1.bigIntToHexadecimalString = bigIntToHexadecimalString;
367
- /**
368
- * Converts a number in hexadecimal (base 16) to binary string
369
- * @param {string} hexadecimalString the number in base 16
370
- * @returns {string} the number converted to base 2
371
- */
372
- let hexadecimalStringToBinaryString = (hexadecimalString) => {
373
- let inDecimal = BigInt(`0x${hexadecimalString}`);
374
- return inDecimal.toString(2);
375
- };
376
- exports$1.hexadecimalStringToBinaryString = hexadecimalStringToBinaryString;
377
- /**
378
- * Converts a number in hexadecimal (base 16) to binary hexadecatet string.
379
- * This means the bits in the output cannot be more than 16
380
- *
381
- * @param hexadecimalString {string} the number converted to binary hexadecatet string
382
- */
383
- let hexadecimalStringToHexadecatetString = (hexadecimalString) => {
384
- let binaryString = (0, exports$1.hexadecimalStringToBinaryString)(hexadecimalString);
385
- let length = binaryString.length;
386
- if (length > 16) {
387
- throw new Error("Given decimal in binary contains digits greater than an Hexadecatet");
388
- }
389
- return (0, BinaryUtils_1.leftPadWithZeroBit)(binaryString, 16);
390
- };
391
- exports$1.hexadecimalStringToHexadecatetString = hexadecimalStringToHexadecatetString;
392
- /**
393
- * Given an IPv6 number in hexadecimal notated string, e.g 2001:0db8:0000:0000:0000:0000:0000:0000 converts it to
394
- * binary string
395
- *
396
- * @param hexadecimalString IPv6 string
397
- * @returns {string} the binary value of the given ipv6 number in string
398
- */
399
- let colonHexadecimalNotationToBinaryString = (hexadecimalString) => {
400
- let expandedIPv6 = (0, IPv6Utils_1.expandIPv6Number)(hexadecimalString);
401
- let stringHexadecimal = expandedIPv6.split(":");
402
- return stringHexadecimal.reduce((binaryAsString, hexidecimal) => {
403
- return binaryAsString.concat((0, exports$1.hexadecimalStringToHexadecatetString)(hexidecimal));
404
- }, '');
405
- };
406
- exports$1.colonHexadecimalNotationToBinaryString = colonHexadecimalNotationToBinaryString;
407
- /**
408
- * Converts number in binary string to hexadecimal string
409
- * @param {string} num in binary string
410
- * @returns {string} num in hexadecimal string
411
- */
412
- let binaryStringToHexadecimalString = (num) => {
413
- // first convert to binary string to decimal (big Integer)
414
- let inDecimal = BigInt(`0b${num}`);
415
- return inDecimal.toString(16);
416
- };
417
- exports$1.binaryStringToHexadecimalString = binaryStringToHexadecimalString;
418
- /**
419
- * Converts a given IPv6 number expressed in the hexadecimal string notation into a 16 bit binary number in string
420
- * @param {string} hexadectetString the IPv6 number
421
- * @returns {string} the IPv6 number converted to binary string
422
- */
423
- let hexadectetNotationToBinaryString = (hexadectetString) => {
424
- let expand = (0, IPv6Utils_1.expandIPv6Number)(hexadectetString);
425
- let hexadecimals = expand.split(":");
426
- return hexadecimals.reduce((hexadecimalAsString, hexavalue) => {
427
- return hexadecimalAsString.concat((0, BinaryUtils_1.leftPadWithZeroBit)((0, exports$1.hexadecimalStringToBinaryString)(hexavalue), 16));
428
- }, '');
429
- };
430
- exports$1.hexadectetNotationToBinaryString = hexadectetNotationToBinaryString;
431
-
432
- } (HexadecimalUtils));
433
- return HexadecimalUtils;
434
- }
348
+ (function (exports$1) {
349
+ Object.defineProperty(exports$1, "__esModule", { value: true });
350
+ exports$1.hexadectetNotationToBinaryString = exports$1.binaryStringToHexadecimalString = exports$1.colonHexadecimalNotationToBinaryString = exports$1.hexadecimalStringToHexadecatetString = exports$1.hexadecimalStringToBinaryString = exports$1.bigIntToHexadecimalString = void 0;
351
+ const IPv6Utils_1 = requireIPv6Utils();
352
+ const BinaryUtils_1 = BinaryUtils;
353
+ /**
354
+ * Converts a given bigint number to a hexadecimal string
355
+ * @param num the bigint number
356
+ * @returns {string} the hexadeciaml string
357
+ */
358
+ let bigIntToHexadecimalString = (num) => {
359
+ return num.toString(16);
360
+ };
361
+ exports$1.bigIntToHexadecimalString = bigIntToHexadecimalString;
362
+ /**
363
+ * Converts a number in hexadecimal (base 16) to binary string
364
+ * @param {string} hexadecimalString the number in base 16
365
+ * @returns {string} the number converted to base 2
366
+ */
367
+ let hexadecimalStringToBinaryString = (hexadecimalString) => {
368
+ let inDecimal = BigInt(`0x${hexadecimalString}`);
369
+ return inDecimal.toString(2);
370
+ };
371
+ exports$1.hexadecimalStringToBinaryString = hexadecimalStringToBinaryString;
372
+ /**
373
+ * Converts a number in hexadecimal (base 16) to binary hexadecatet string.
374
+ * This means the bits in the output cannot be more than 16
375
+ *
376
+ * @param hexadecimalString {string} the number converted to binary hexadecatet string
377
+ */
378
+ let hexadecimalStringToHexadecatetString = (hexadecimalString) => {
379
+ let binaryString = (0, exports$1.hexadecimalStringToBinaryString)(hexadecimalString);
380
+ let length = binaryString.length;
381
+ if (length > 16) {
382
+ throw new Error("Given decimal in binary contains digits greater than an Hexadecatet");
383
+ }
384
+ return (0, BinaryUtils_1.leftPadWithZeroBit)(binaryString, 16);
385
+ };
386
+ exports$1.hexadecimalStringToHexadecatetString = hexadecimalStringToHexadecatetString;
387
+ /**
388
+ * Given an IPv6 number in hexadecimal notated string, e.g 2001:0db8:0000:0000:0000:0000:0000:0000 converts it to
389
+ * binary string
390
+ *
391
+ * @param hexadecimalString IPv6 string
392
+ * @returns {string} the binary value of the given ipv6 number in string
393
+ */
394
+ let colonHexadecimalNotationToBinaryString = (hexadecimalString) => {
395
+ let expandedIPv6 = (0, IPv6Utils_1.expandIPv6Number)(hexadecimalString);
396
+ let stringHexadecimal = expandedIPv6.split(":");
397
+ return stringHexadecimal.reduce((binaryAsString, hexidecimal) => {
398
+ return binaryAsString.concat((0, exports$1.hexadecimalStringToHexadecatetString)(hexidecimal));
399
+ }, '');
400
+ };
401
+ exports$1.colonHexadecimalNotationToBinaryString = colonHexadecimalNotationToBinaryString;
402
+ /**
403
+ * Converts number in binary string to hexadecimal string
404
+ * @param {string} num in binary string
405
+ * @returns {string} num in hexadecimal string
406
+ */
407
+ let binaryStringToHexadecimalString = (num) => {
408
+ // first convert to binary string to decimal (big Integer)
409
+ let inDecimal = BigInt(`0b${num}`);
410
+ return inDecimal.toString(16);
411
+ };
412
+ exports$1.binaryStringToHexadecimalString = binaryStringToHexadecimalString;
413
+ /**
414
+ * Converts a given IPv6 number expressed in the hexadecimal string notation into a 16 bit binary number in string
415
+ * @param {string} hexadectetString the IPv6 number
416
+ * @returns {string} the IPv6 number converted to binary string
417
+ */
418
+ let hexadectetNotationToBinaryString = (hexadectetString) => {
419
+ let expand = (0, IPv6Utils_1.expandIPv6Number)(hexadectetString);
420
+ let hexadecimals = expand.split(":");
421
+ return hexadecimals.reduce((hexadecimalAsString, hexavalue) => {
422
+ return hexadecimalAsString.concat((0, BinaryUtils_1.leftPadWithZeroBit)((0, exports$1.hexadecimalStringToBinaryString)(hexavalue), 16));
423
+ }, '');
424
+ };
425
+ exports$1.hexadectetNotationToBinaryString = hexadectetNotationToBinaryString;
426
+
427
+ } (HexadecimalUtils));
435
428
 
436
429
  var hasRequiredValidator;
437
430
 
@@ -443,8 +436,8 @@ function requireValidator () {
443
436
  const BinaryUtils_1 = BinaryUtils;
444
437
  const BinaryUtils_2 = BinaryUtils;
445
438
  const IPv6Utils_1 = requireIPv6Utils();
446
- const HexadecimalUtils_1 = requireHexadecimalUtils();
447
- const HexadecimalUtils_2 = requireHexadecimalUtils();
439
+ const HexadecimalUtils_1 = HexadecimalUtils;
440
+ const HexadecimalUtils_2 = HexadecimalUtils;
448
441
  let Validator$1 = class Validator {
449
442
  /**
450
443
  * Checks if given ipNumber is in between the given lower and upper bound
@@ -941,9 +934,9 @@ const BinaryUtils_2 = BinaryUtils;
941
934
  const BinaryUtils_3 = BinaryUtils;
942
935
  const BinaryUtils_4 = BinaryUtils;
943
936
  const Hexadecatet_1$1 = Hexadecatet$1;
944
- const HexadecimalUtils_1$1 = requireHexadecimalUtils();
937
+ const HexadecimalUtils_1$1 = HexadecimalUtils;
945
938
  const IPv6Utils_1 = requireIPv6Utils();
946
- const HexadecimalUtils_2 = requireHexadecimalUtils();
939
+ const HexadecimalUtils_2 = HexadecimalUtils;
947
940
  /**
948
941
  * Provides the implementation of functionality that are common
949
942
  * to {@link IPv4}, {@link IPv6}, {@link IPv4Mask} and {@link IPv6Mask}
@@ -1694,7 +1687,7 @@ Prefix.isIPv4Prefix = isIPv4Prefix;
1694
1687
  const Validator_1$1 = requireValidator();
1695
1688
  const IPNumber_1$1 = IPNumber;
1696
1689
  const BinaryUtils_1$1 = BinaryUtils;
1697
- const HexadecimalUtils_1 = requireHexadecimalUtils();
1690
+ const HexadecimalUtils_1 = HexadecimalUtils;
1698
1691
  const Hexadecatet_1 = Hexadecatet$1;
1699
1692
  /**
1700
1693
  * Represents the prefix portion in the CIDR notation for representing IP ranges
@@ -3192,7 +3185,7 @@ class SortedSet {
3192
3185
  */
3193
3186
  __exportStar(BinaryUtils, exports$1);
3194
3187
  __exportStar(Hexadecatet$1, exports$1);
3195
- __exportStar(requireHexadecimalUtils(), exports$1);
3188
+ __exportStar(HexadecimalUtils, exports$1);
3196
3189
  __exportStar(IPNumber, exports$1);
3197
3190
  __exportStar(IPNumType, exports$1);
3198
3191
  __exportStar(IPPool, exports$1);