@holoscript/std 3.1.1 → 6.0.3

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 (106) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/dist/__tests__/EconomicPrimitives.test.d.ts +2 -0
  4. package/dist/__tests__/EconomicTraits.test.d.ts +2 -0
  5. package/dist/__tests__/SimulationLabPrimitives.test.d.ts +2 -0
  6. package/dist/__tests__/collections.test.d.ts +2 -0
  7. package/dist/__tests__/events.test.d.ts +2 -0
  8. package/dist/__tests__/index.test.d.ts +2 -0
  9. package/dist/__tests__/index.test.d.ts.map +1 -0
  10. package/dist/__tests__/materials.test.d.ts +2 -0
  11. package/dist/__tests__/math.test.d.ts +2 -0
  12. package/dist/__tests__/physics.test.d.ts +2 -0
  13. package/dist/__tests__/spatial.test.d.ts +2 -0
  14. package/dist/__tests__/standard-library-fundamentals.test.d.ts +2 -0
  15. package/dist/__tests__/standard-library-fundamentals.test.d.ts.map +1 -0
  16. package/dist/__tests__/string-and-time-utilities.test.d.ts +2 -0
  17. package/dist/__tests__/string-and-time-utilities.test.d.ts.map +1 -0
  18. package/dist/__tests__/string-decoupled.test.d.ts +2 -0
  19. package/dist/__tests__/string.test.d.ts +2 -0
  20. package/dist/__tests__/time.test.d.ts +2 -0
  21. package/dist/chunk-7HVUYGPS.js +679 -0
  22. package/dist/chunk-7HVUYGPS.js.map +1 -0
  23. package/dist/chunk-P4O3WNG2.js +287 -0
  24. package/dist/chunk-P4O3WNG2.js.map +1 -0
  25. package/dist/chunk-PFX2JM4X.js +683 -0
  26. package/dist/chunk-PFX2JM4X.js.map +1 -0
  27. package/dist/chunk-W2Q3LUCM.js +348 -0
  28. package/dist/chunk-W2Q3LUCM.js.map +1 -0
  29. package/dist/chunk-WS6W35YC.js +443 -0
  30. package/dist/chunk-WS6W35YC.js.map +1 -0
  31. package/dist/chunk-ZXVZAQCZ.js +470 -0
  32. package/dist/chunk-ZXVZAQCZ.js.map +1 -0
  33. package/dist/collections.cjs +715 -0
  34. package/dist/collections.cjs.map +1 -0
  35. package/dist/collections.d.ts +177 -0
  36. package/dist/collections.js +17 -0
  37. package/dist/collections.js.map +1 -0
  38. package/dist/events.d.ts +32 -0
  39. package/dist/index.cjs +4101 -0
  40. package/dist/index.cjs.map +1 -0
  41. package/dist/index.d.ts +101 -0
  42. package/dist/index.js +1270 -190
  43. package/dist/index.js.map +1 -0
  44. package/dist/materials.d.ts +50 -0
  45. package/dist/math.cjs +591 -0
  46. package/dist/math.cjs.map +1 -0
  47. package/dist/math.d.ts +162 -0
  48. package/dist/math.js +53 -0
  49. package/dist/math.js.map +1 -0
  50. package/dist/physics.d.ts +59 -0
  51. package/dist/spatial.d.ts +82 -0
  52. package/dist/string.basic.test.d.ts +5 -0
  53. package/dist/string.basic.test.d.ts.map +1 -0
  54. package/dist/string.cjs +422 -0
  55. package/dist/string.cjs.map +1 -0
  56. package/dist/string.d.ts +212 -0
  57. package/dist/string.d.ts.map +1 -1
  58. package/dist/string.js +107 -0
  59. package/dist/string.js.map +1 -0
  60. package/dist/string.test.d.ts +5 -0
  61. package/dist/string.test.d.ts.map +1 -0
  62. package/dist/time.cjs +512 -0
  63. package/dist/time.cjs.map +1 -0
  64. package/dist/time.d.ts +215 -0
  65. package/dist/time.js +43 -0
  66. package/dist/time.js.map +1 -0
  67. package/dist/traits/ARTraits.d.ts +14 -0
  68. package/dist/traits/EconomicPrimitives.cjs +335 -0
  69. package/dist/traits/EconomicPrimitives.cjs.map +1 -0
  70. package/dist/traits/EconomicPrimitives.d.ts +345 -0
  71. package/dist/traits/EconomicPrimitives.js +55 -0
  72. package/dist/traits/EconomicPrimitives.js.map +1 -0
  73. package/dist/traits/EconomicTraits.cjs +471 -0
  74. package/dist/traits/EconomicTraits.cjs.map +1 -0
  75. package/dist/traits/EconomicTraits.d.ts +71 -0
  76. package/dist/traits/EconomicTraits.js +17 -0
  77. package/dist/traits/EconomicTraits.js.map +1 -0
  78. package/dist/traits/IoTTraits.d.ts +14 -0
  79. package/dist/traits/SimulationLabPrimitives.d.ts +187 -0
  80. package/dist/traits/SimulationLabTraits.d.ts +42 -0
  81. package/dist/traits/VRRTraits.d.ts +150 -0
  82. package/dist/traits/__tests__/ARTraits.test.d.ts +2 -0
  83. package/dist/traits/__tests__/ARTraits.test.d.ts.map +1 -0
  84. package/dist/traits/__tests__/EconomicPrimitives.test.d.ts +2 -0
  85. package/dist/traits/__tests__/EconomicPrimitives.test.d.ts.map +1 -0
  86. package/dist/traits/__tests__/EconomicTraits.test.d.ts +2 -0
  87. package/dist/traits/__tests__/EconomicTraits.test.d.ts.map +1 -0
  88. package/dist/types.d.ts +202 -0
  89. package/error-utf8.log +6 -0
  90. package/error.log +0 -0
  91. package/package.json +30 -18
  92. package/src/__tests__/index.test.ts +14 -0
  93. package/src/__tests__/{Sprint33.test.ts → standard-library-fundamentals.test.ts} +70 -70
  94. package/src/__tests__/{Sprint56.test.ts → string-and-time-utilities.test.ts} +64 -64
  95. package/src/__tests__/string-decoupled.test.ts +0 -2
  96. package/src/string.basic.test.ts +1 -1
  97. package/src/string.test.ts +4 -4
  98. package/src/string.ts +30 -15
  99. package/src/time.ts +1 -1
  100. package/src/traits/__tests__/ARTraits.test.ts +14 -0
  101. package/src/traits/__tests__/EconomicPrimitives.test.ts +14 -0
  102. package/src/traits/__tests__/EconomicTraits.test.ts +14 -0
  103. package/std_error.log +5 -0
  104. package/tsup.config.ts +17 -0
  105. package/dist/__tests__/Sprint33.test.d.ts.map +0 -1
  106. package/dist/__tests__/Sprint56.test.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,46 +1,48 @@
1
1
  {
2
2
  "name": "@holoscript/std",
3
- "version": "3.1.1",
3
+ "version": "6.0.3",
4
4
  "description": "HoloScript Standard Library - Core types and utilities",
5
- "main": "dist/index.js",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
7
8
  "type": "module",
8
9
  "exports": {
9
10
  ".": {
10
11
  "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
12
14
  },
13
15
  "./math": {
14
16
  "types": "./dist/math.d.ts",
15
- "import": "./dist/math.js"
17
+ "import": "./dist/math.js",
18
+ "require": "./dist/math.cjs"
16
19
  },
17
20
  "./collections": {
18
21
  "types": "./dist/collections.d.ts",
19
- "import": "./dist/collections.js"
22
+ "import": "./dist/collections.js",
23
+ "require": "./dist/collections.cjs"
20
24
  },
21
25
  "./string": {
22
26
  "types": "./dist/string.d.ts",
23
- "import": "./dist/string.js"
27
+ "import": "./dist/string.js",
28
+ "require": "./dist/string.cjs"
24
29
  },
25
30
  "./time": {
26
31
  "types": "./dist/time.d.ts",
27
- "import": "./dist/time.js"
32
+ "import": "./dist/time.js",
33
+ "require": "./dist/time.cjs"
28
34
  },
29
35
  "./economic": {
30
36
  "types": "./dist/traits/EconomicPrimitives.d.ts",
31
- "import": "./dist/traits/EconomicPrimitives.js"
37
+ "import": "./dist/traits/EconomicPrimitives.js",
38
+ "require": "./dist/traits/EconomicPrimitives.cjs"
32
39
  },
33
40
  "./economic-traits": {
34
41
  "types": "./dist/traits/EconomicTraits.d.ts",
35
- "import": "./dist/traits/EconomicTraits.js"
42
+ "import": "./dist/traits/EconomicTraits.js",
43
+ "require": "./dist/traits/EconomicTraits.cjs"
36
44
  }
37
45
  },
38
- "scripts": {
39
- "build": "tsc",
40
- "watch": "tsc -w",
41
- "clean": "rm -rf dist",
42
- "test": "vitest run --passWithNoTests"
43
- },
44
46
  "keywords": [
45
47
  "holoscript",
46
48
  "std",
@@ -55,12 +57,22 @@
55
57
  "license": "MIT",
56
58
  "repository": {
57
59
  "type": "git",
58
- "url": "https://github.com/brianonbased-dev/Holoscript.git",
60
+ "url": "https://github.com/brianonbased-dev/HoloScript.git",
59
61
  "directory": "packages/std"
60
62
  },
61
63
  "devDependencies": {
62
64
  "@types/node": "^24.10.1",
63
65
  "typescript": "~5.9.3",
64
- "vitest": "^4.0.18"
66
+ "vitest": "^4.1.4"
67
+ },
68
+ "homepage": "https://github.com/brianonbased-dev/HoloScript#readme",
69
+ "bugs": {
70
+ "url": "https://github.com/brianonbased-dev/HoloScript/issues"
71
+ },
72
+ "scripts": {
73
+ "build": "tsup && tsc --emitDeclarationOnly --declarationDir dist --skipLibCheck",
74
+ "watch": "tsc -w",
75
+ "clean": "rm -rf dist",
76
+ "test": "vitest run --passWithNoTests"
65
77
  }
66
- }
78
+ }
@@ -0,0 +1,14 @@
1
+ import { describe, it, expect } from 'vitest';
2
+
3
+ // Auto-generated test for index
4
+ // Source: packages/std/src/index.ts
5
+
6
+ describe('index', () => {
7
+ it('should be defined', () => {
8
+ // TODO: Import and test index
9
+ });
10
+
11
+ it('should have basic functionality', () => {
12
+ // TODO: Add meaningful tests for index
13
+ });
14
+ });
@@ -1,12 +1,12 @@
1
- /**
2
- * Sprint 33 — @holoscript/std acceptance tests
1
+ /**
2
+ * @holoscript/std acceptance tests
3
3
  * Covers: types, collections, math, string, time
4
4
  */
5
5
  import { describe, it, expect, vi, beforeEach } from 'vitest';
6
6
 
7
- // ─────────────────────────────────────────────
7
+ // ─────────────────────────────────────────────
8
8
  // types.ts
9
- // ─────────────────────────────────────────────
9
+ // ─────────────────────────────────────────────
10
10
  import {
11
11
  vec2,
12
12
  vec3,
@@ -26,14 +26,14 @@ import {
26
26
  colorToHex,
27
27
  } from '../types.js';
28
28
 
29
- // ─────────────────────────────────────────────
29
+ // ─────────────────────────────────────────────
30
30
  // collections.ts
31
- // ─────────────────────────────────────────────
31
+ // ─────────────────────────────────────────────
32
32
  import { List, HoloMap, HoloSet, SpatialGrid, PriorityQueue } from '../collections.js';
33
33
 
34
- // ─────────────────────────────────────────────
34
+ // ─────────────────────────────────────────────
35
35
  // math.ts
36
- // ─────────────────────────────────────────────
36
+ // ─────────────────────────────────────────────
37
37
  import {
38
38
  PI,
39
39
  TAU,
@@ -60,9 +60,9 @@ import {
60
60
  random,
61
61
  } from '../math.js';
62
62
 
63
- // ─────────────────────────────────────────────
63
+ // ─────────────────────────────────────────────
64
64
  // string.ts
65
- // ─────────────────────────────────────────────
65
+ // ─────────────────────────────────────────────
66
66
  import {
67
67
  capitalize,
68
68
  titleCase,
@@ -113,9 +113,9 @@ import {
113
113
  uuid,
114
114
  } from '../string.js';
115
115
 
116
- // ─────────────────────────────────────────────
116
+ // ─────────────────────────────────────────────
117
117
  // time.ts
118
- // ─────────────────────────────────────────────
118
+ // ─────────────────────────────────────────────
119
119
  import {
120
120
  now,
121
121
  sleep,
@@ -127,10 +127,10 @@ import {
127
127
  DateTime,
128
128
  } from '../time.js';
129
129
 
130
- // ═══════════════════════════════════════════════
130
+ // ═══════════════════════════════════════════════
131
131
  // types.ts
132
- // ═══════════════════════════════════════════════
133
- describe('types factory functions', () => {
132
+ // ═══════════════════════════════════════════════
133
+ describe('types — factory functions', () => {
134
134
  it('vec2 defaults to (0,0)', () => {
135
135
  const v = vec2();
136
136
  expect(v.x).toBe(0);
@@ -203,7 +203,7 @@ describe('types — factory functions', () => {
203
203
  });
204
204
  });
205
205
 
206
- describe('types conversion utilities', () => {
206
+ describe('types — conversion utilities', () => {
207
207
  it('vec3ToArray / arrayToVec3 round-trip', () => {
208
208
  const v = vec3(1, 2, 3);
209
209
  const arr = vec3ToArray(v);
@@ -236,9 +236,9 @@ describe('types — conversion utilities', () => {
236
236
  });
237
237
  });
238
238
 
239
- // ═══════════════════════════════════════════════
240
- // collections List
241
- // ═══════════════════════════════════════════════
239
+ // ═══════════════════════════════════════════════
240
+ // collections — List
241
+ // ═══════════════════════════════════════════════
242
242
  describe('List', () => {
243
243
  it('creates empty list', () => {
244
244
  const l = new List<number>();
@@ -363,9 +363,9 @@ describe('List', () => {
363
363
  });
364
364
  });
365
365
 
366
- // ═══════════════════════════════════════════════
367
- // collections HoloMap
368
- // ═══════════════════════════════════════════════
366
+ // ═══════════════════════════════════════════════
367
+ // collections — HoloMap
368
+ // ═══════════════════════════════════════════════
369
369
  describe('HoloMap', () => {
370
370
  it('creates empty map', () => {
371
371
  const m = new HoloMap<string, number>();
@@ -435,9 +435,9 @@ describe('HoloMap', () => {
435
435
  });
436
436
  });
437
437
 
438
- // ═══════════════════════════════════════════════
439
- // collections HoloSet
440
- // ═══════════════════════════════════════════════
438
+ // ═══════════════════════════════════════════════
439
+ // collections — HoloSet
440
+ // ═══════════════════════════════════════════════
441
441
  describe('HoloSet', () => {
442
442
  it('creates empty set', () => {
443
443
  const s = new HoloSet<number>();
@@ -516,9 +516,9 @@ describe('HoloSet', () => {
516
516
  });
517
517
  });
518
518
 
519
- // ═══════════════════════════════════════════════
520
- // collections PriorityQueue
521
- // ═══════════════════════════════════════════════
519
+ // ═══════════════════════════════════════════════
520
+ // collections — PriorityQueue
521
+ // ═══════════════════════════════════════════════
522
522
  describe('PriorityQueue', () => {
523
523
  it('minHeap dequeues lowest priority first', () => {
524
524
  const pq = PriorityQueue.minHeap<string>();
@@ -561,9 +561,9 @@ describe('PriorityQueue', () => {
561
561
  });
562
562
  });
563
563
 
564
- // ═══════════════════════════════════════════════
565
- // collections SpatialGrid
566
- // ═══════════════════════════════════════════════
564
+ // ═══════════════════════════════════════════════
565
+ // collections — SpatialGrid
566
+ // ═══════════════════════════════════════════════
567
567
  describe('SpatialGrid', () => {
568
568
  it('insert and query by radius', () => {
569
569
  const grid = new SpatialGrid<string>(1.0);
@@ -592,9 +592,9 @@ describe('SpatialGrid', () => {
592
592
  });
593
593
  });
594
594
 
595
- // ═══════════════════════════════════════════════
596
- // math constants
597
- // ═══════════════════════════════════════════════
595
+ // ═══════════════════════════════════════════════
596
+ // math — constants
597
+ // ═══════════════════════════════════════════════
598
598
  describe('math constants', () => {
599
599
  it('PI is ~3.14159', () => expect(PI).toBeCloseTo(3.14159, 4));
600
600
  it('TAU is 2*PI', () => expect(TAU).toBeCloseTo(PI * 2, 10));
@@ -604,10 +604,10 @@ describe('math constants', () => {
604
604
  it('EPSILON is small', () => expect(EPSILON).toBeGreaterThan(0));
605
605
  });
606
606
 
607
- // ═══════════════════════════════════════════════
608
- // math basic functions
609
- // ═══════════════════════════════════════════════
610
- describe('math basic functions', () => {
607
+ // ═══════════════════════════════════════════════
608
+ // math — basic functions
609
+ // ═══════════════════════════════════════════════
610
+ describe('math — basic functions', () => {
611
611
  it('clamp', () => {
612
612
  expect(clamp(5, 0, 10)).toBe(5);
613
613
  expect(clamp(-5, 0, 10)).toBe(0);
@@ -664,9 +664,9 @@ describe('math — basic functions', () => {
664
664
  });
665
665
  });
666
666
 
667
- // ═══════════════════════════════════════════════
668
- // math vec2Math
669
- // ═══════════════════════════════════════════════
667
+ // ═══════════════════════════════════════════════
668
+ // math — vec2Math
669
+ // ═══════════════════════════════════════════════
670
670
  describe('vec2Math', () => {
671
671
  it('add', () => {
672
672
  const r = vec2Math.add({ x: 1, y: 2 }, { x: 3, y: 4 });
@@ -712,9 +712,9 @@ describe('vec2Math', () => {
712
712
  });
713
713
  });
714
714
 
715
- // ═══════════════════════════════════════════════
716
- // math vec3Math
717
- // ═══════════════════════════════════════════════
715
+ // ═══════════════════════════════════════════════
716
+ // math — vec3Math
717
+ // ═══════════════════════════════════════════════
718
718
  describe('vec3Math', () => {
719
719
  it('zero / one factory functions', () => {
720
720
  expect(vec3Math.zero()).toEqual({ x: 0, y: 0, z: 0 });
@@ -776,9 +776,9 @@ describe('vec3Math', () => {
776
776
  });
777
777
  });
778
778
 
779
- // ═══════════════════════════════════════════════
780
- // math quatMath
781
- // ═══════════════════════════════════════════════
779
+ // ═══════════════════════════════════════════════
780
+ // math — quatMath
781
+ // ═══════════════════════════════════════════════
782
782
  describe('quatMath', () => {
783
783
  it('identity quaternion', () => {
784
784
  const q = quatMath.identity();
@@ -827,9 +827,9 @@ describe('quatMath', () => {
827
827
  });
828
828
  });
829
829
 
830
- // ═══════════════════════════════════════════════
831
- // math aabbMath
832
- // ═══════════════════════════════════════════════
830
+ // ═══════════════════════════════════════════════
831
+ // math — aabbMath
832
+ // ═══════════════════════════════════════════════
833
833
  describe('aabbMath', () => {
834
834
  const box = { min: { x: 0, y: 0, z: 0 }, max: { x: 2, y: 2, z: 2 } };
835
835
 
@@ -875,9 +875,9 @@ describe('aabbMath', () => {
875
875
  });
876
876
  });
877
877
 
878
- // ═══════════════════════════════════════════════
879
- // math noise
880
- // ═══════════════════════════════════════════════
878
+ // ═══════════════════════════════════════════════
879
+ // math — noise
880
+ // ═══════════════════════════════════════════════
881
881
  describe('noise', () => {
882
882
  it('perlin2d returns value in range', () => {
883
883
  const v = noise.perlin2d(0.5, 0.5);
@@ -912,9 +912,9 @@ describe('noise', () => {
912
912
  });
913
913
  });
914
914
 
915
- // ═══════════════════════════════════════════════
916
- // math random
917
- // ═══════════════════════════════════════════════
915
+ // ═══════════════════════════════════════════════
916
+ // math — random
917
+ // ═══════════════════════════════════════════════
918
918
  describe('random', () => {
919
919
  it('float returns [0,1)', () => {
920
920
  for (let i = 0; i < 20; i++) {
@@ -976,10 +976,10 @@ describe('random', () => {
976
976
  });
977
977
  });
978
978
 
979
- // ═══════════════════════════════════════════════
979
+ // ═══════════════════════════════════════════════
980
980
  // string utilities
981
- // ═══════════════════════════════════════════════
982
- describe('string case conversion', () => {
981
+ // ═══════════════════════════════════════════════
982
+ describe('string — case conversion', () => {
983
983
  it('capitalize', () => expect(capitalize('hello world')).toBe('Hello world'));
984
984
  it('titleCase', () => expect(titleCase('hello world')).toBe('Hello World'));
985
985
  it('camelCase', () => expect(camelCase('hello world')).toBe('helloWorld'));
@@ -989,7 +989,7 @@ describe('string — case conversion', () => {
989
989
  it('constantCase', () => expect(constantCase('helloWorld')).toBe('HELLO_WORLD'));
990
990
  });
991
991
 
992
- describe('string padding and truncation', () => {
992
+ describe('string — padding and truncation', () => {
993
993
  it('padLeft', () => expect(padLeft('hi', 5)).toBe(' hi'));
994
994
  it('padRight', () => expect(padRight('hi', 5)).toBe('hi '));
995
995
  it('center', () => {
@@ -1007,7 +1007,7 @@ describe('string — padding and truncation', () => {
1007
1007
  });
1008
1008
  });
1009
1009
 
1010
- describe('string checks', () => {
1010
+ describe('string — checks', () => {
1011
1011
  it('isBlank / isNotBlank', () => {
1012
1012
  expect(isBlank('')).toBe(true);
1013
1013
  expect(isBlank(' ')).toBe(true);
@@ -1049,7 +1049,7 @@ describe('string — checks', () => {
1049
1049
  });
1050
1050
  });
1051
1051
 
1052
- describe('string manipulation', () => {
1052
+ describe('string — manipulation', () => {
1053
1053
  it('repeat', () => expect(repeat('ab', 3)).toBe('ababab'));
1054
1054
  it('reverse', () => expect(reverse('hello')).toBe('olleh'));
1055
1055
  it('count occurrences', () => expect(count('hello world hello', 'hello')).toBe(2));
@@ -1061,7 +1061,7 @@ describe('string — manipulation', () => {
1061
1061
  it('unwrap', () => expect(unwrap('"hello"', '"')).toBe('hello'));
1062
1062
  });
1063
1063
 
1064
- describe('string splitting', () => {
1064
+ describe('string — splitting', () => {
1065
1065
  it('lines splits by newline', () => {
1066
1066
  const l = lines('a\nb\nc');
1067
1067
  expect(l).toEqual(['a', 'b', 'c']);
@@ -1075,7 +1075,7 @@ describe('string — splitting', () => {
1075
1075
  });
1076
1076
  });
1077
1077
 
1078
- describe('string formatting', () => {
1078
+ describe('string — formatting', () => {
1079
1079
  it('format substitutes named placeholders', () => {
1080
1080
  const result = format('Hello {name}, you are {age}!', { name: 'World', age: 42 });
1081
1081
  expect(result).toContain('World');
@@ -1093,7 +1093,7 @@ describe('string — formatting', () => {
1093
1093
  });
1094
1094
  });
1095
1095
 
1096
- describe('string escaping', () => {
1096
+ describe('string — escaping', () => {
1097
1097
  it('escapeHtml / unescapeHtml', () => {
1098
1098
  const escaped = escapeHtml('<b>hello</b>');
1099
1099
  expect(escaped).toContain('&lt;');
@@ -1111,7 +1111,7 @@ describe('string — escaping', () => {
1111
1111
  });
1112
1112
  });
1113
1113
 
1114
- describe('string similarity', () => {
1114
+ describe('string — similarity', () => {
1115
1115
  it('levenshtein', () => {
1116
1116
  expect(levenshtein('kitten', 'sitting')).toBeGreaterThan(0);
1117
1117
  expect(levenshtein('abc', 'abc')).toBe(0);
@@ -1128,7 +1128,7 @@ describe('string — similarity', () => {
1128
1128
  });
1129
1129
  });
1130
1130
 
1131
- describe('string indentation', () => {
1131
+ describe('string — indentation', () => {
1132
1132
  it('indent adds prefix', () => {
1133
1133
  const s = indent('a\nb', 2);
1134
1134
  expect(s).toContain(' a');
@@ -1149,7 +1149,7 @@ describe('string — indentation', () => {
1149
1149
  });
1150
1150
  });
1151
1151
 
1152
- describe('string generation', () => {
1152
+ describe('string — generation', () => {
1153
1153
  it('randomString generates string of given length', () => {
1154
1154
  const s = randomString(10);
1155
1155
  expect(s.length).toBe(10);
@@ -1162,9 +1162,9 @@ describe('string — generation', () => {
1162
1162
  });
1163
1163
  });
1164
1164
 
1165
- // ═══════════════════════════════════════════════
1165
+ // ═══════════════════════════════════════════════
1166
1166
  // time utilities
1167
- // ═══════════════════════════════════════════════
1167
+ // ═══════════════════════════════════════════════
1168
1168
  describe('now', () => {
1169
1169
  it('returns number', () => {
1170
1170
  expect(typeof now()).toBe('number');