cmpstr 3.2.2 → 3.3.0
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.
- package/dist/CmpStr.esm.js +2149 -1721
- package/dist/CmpStr.esm.min.js +2 -2
- package/dist/CmpStr.umd.js +2028 -1604
- package/dist/CmpStr.umd.min.js +2 -2
- package/dist/cjs/CmpStr.cjs +100 -51
- package/dist/cjs/CmpStrAsync.cjs +35 -18
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/metric/Cosine.cjs +1 -1
- package/dist/cjs/metric/DamerauLevenshtein.cjs +1 -1
- package/dist/cjs/metric/DiceSorensen.cjs +1 -1
- package/dist/cjs/metric/Hamming.cjs +1 -1
- package/dist/cjs/metric/Jaccard.cjs +1 -1
- package/dist/cjs/metric/JaroWinkler.cjs +1 -1
- package/dist/cjs/metric/LCS.cjs +1 -1
- package/dist/cjs/metric/Levenshtein.cjs +1 -1
- package/dist/cjs/metric/Metric.cjs +40 -22
- package/dist/cjs/metric/NeedlemanWunsch.cjs +1 -1
- package/dist/cjs/metric/QGram.cjs +1 -1
- package/dist/cjs/metric/SmithWaterman.cjs +1 -1
- package/dist/cjs/phonetic/Caverphone.cjs +1 -1
- package/dist/cjs/phonetic/Cologne.cjs +1 -1
- package/dist/cjs/phonetic/Metaphone.cjs +1 -1
- package/dist/cjs/phonetic/Phonetic.cjs +27 -15
- package/dist/cjs/phonetic/Soundex.cjs +1 -1
- package/dist/cjs/root.cjs +4 -2
- package/dist/cjs/utils/DeepMerge.cjs +102 -97
- package/dist/cjs/utils/DiffChecker.cjs +1 -1
- package/dist/cjs/utils/Errors.cjs +22 -19
- package/dist/cjs/utils/Filter.cjs +59 -24
- package/dist/cjs/utils/HashTable.cjs +44 -29
- package/dist/cjs/utils/Normalizer.cjs +57 -28
- package/dist/cjs/utils/OptionsValidator.cjs +211 -0
- package/dist/cjs/utils/Pool.cjs +27 -13
- package/dist/cjs/utils/Profiler.cjs +41 -27
- package/dist/cjs/utils/Registry.cjs +5 -5
- package/dist/cjs/utils/StructuredData.cjs +83 -53
- package/dist/cjs/utils/TextAnalyzer.cjs +1 -1
- package/dist/esm/CmpStr.mjs +101 -52
- package/dist/esm/CmpStrAsync.mjs +35 -18
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/metric/Cosine.mjs +1 -1
- package/dist/esm/metric/DamerauLevenshtein.mjs +1 -1
- package/dist/esm/metric/DiceSorensen.mjs +1 -1
- package/dist/esm/metric/Hamming.mjs +1 -1
- package/dist/esm/metric/Jaccard.mjs +1 -1
- package/dist/esm/metric/JaroWinkler.mjs +1 -1
- package/dist/esm/metric/LCS.mjs +1 -1
- package/dist/esm/metric/Levenshtein.mjs +1 -1
- package/dist/esm/metric/Metric.mjs +40 -22
- package/dist/esm/metric/NeedlemanWunsch.mjs +1 -1
- package/dist/esm/metric/QGram.mjs +1 -1
- package/dist/esm/metric/SmithWaterman.mjs +1 -1
- package/dist/esm/phonetic/Caverphone.mjs +1 -1
- package/dist/esm/phonetic/Cologne.mjs +1 -1
- package/dist/esm/phonetic/Metaphone.mjs +1 -1
- package/dist/esm/phonetic/Phonetic.mjs +30 -15
- package/dist/esm/phonetic/Soundex.mjs +1 -1
- package/dist/esm/root.mjs +3 -3
- package/dist/esm/utils/DeepMerge.mjs +103 -94
- package/dist/esm/utils/DiffChecker.mjs +1 -1
- package/dist/esm/utils/Errors.mjs +22 -19
- package/dist/esm/utils/Filter.mjs +59 -24
- package/dist/esm/utils/HashTable.mjs +44 -29
- package/dist/esm/utils/Normalizer.mjs +57 -28
- package/dist/esm/utils/OptionsValidator.mjs +210 -0
- package/dist/esm/utils/Pool.mjs +27 -13
- package/dist/esm/utils/Profiler.mjs +41 -27
- package/dist/esm/utils/Registry.mjs +5 -5
- package/dist/esm/utils/StructuredData.mjs +83 -53
- package/dist/esm/utils/TextAnalyzer.mjs +1 -1
- package/dist/types/CmpStr.d.ts +22 -15
- package/dist/types/CmpStrAsync.d.ts +3 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/metric/Metric.d.ts +9 -9
- package/dist/types/phonetic/Phonetic.d.ts +4 -3
- package/dist/types/root.d.ts +3 -2
- package/dist/types/utils/DeepMerge.d.ts +80 -58
- package/dist/types/utils/Errors.d.ts +25 -8
- package/dist/types/utils/Filter.d.ts +4 -1
- package/dist/types/utils/HashTable.d.ts +12 -11
- package/dist/types/utils/Normalizer.d.ts +2 -1
- package/dist/types/utils/OptionsValidator.d.ts +193 -0
- package/dist/types/utils/Profiler.d.ts +9 -28
- package/dist/types/utils/StructuredData.d.ts +3 -0
- package/dist/types/utils/Types.d.ts +13 -1
- package/package.json +14 -5
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CmpStr Options Validator
|
|
3
|
+
* src/utils/OptionsValidator.ts
|
|
4
|
+
*
|
|
5
|
+
* This module provides the OptionsValidator class, which contains static methods for validating
|
|
6
|
+
* the options passed to the CmpStr function. It checks for correct types, allowed values, and
|
|
7
|
+
* the existence of specified metrics and phonetic algorithms in their respective registries.
|
|
8
|
+
*
|
|
9
|
+
* If any validation fails, a CmpStrValidationError is thrown with a descriptive message and
|
|
10
|
+
* relevant details about the invalid option.
|
|
11
|
+
*
|
|
12
|
+
* @module Utils
|
|
13
|
+
* @name OptionsValidator
|
|
14
|
+
* @author Paul Köhler (komed3)
|
|
15
|
+
* @license MIT
|
|
16
|
+
*/
|
|
17
|
+
import type { CmpStrOptions, CmpStrProcessors, MetricOptions, PhoneticOptions, StructuredDataOptions } from './Types';
|
|
18
|
+
/**
|
|
19
|
+
* Utility for validating CmpStr options.
|
|
20
|
+
*
|
|
21
|
+
* This class provides static methods to validate various aspects of the
|
|
22
|
+
* options object passed to CmpStr.
|
|
23
|
+
*/
|
|
24
|
+
export declare class OptionsValidator {
|
|
25
|
+
/** Allowed normalization flags */
|
|
26
|
+
private static readonly ALLOWED_FLAGS;
|
|
27
|
+
/** Allowed output modes */
|
|
28
|
+
private static readonly ALLOWED_OUTPUT;
|
|
29
|
+
/** Allowed comparison modes */
|
|
30
|
+
private static readonly ALLOWED_MODES;
|
|
31
|
+
/** Allowed sort modes */
|
|
32
|
+
private static readonly ALLOWED_SORT;
|
|
33
|
+
/** Processor dispatch table */
|
|
34
|
+
private static readonly PROCESSORS;
|
|
35
|
+
/** Metric options validation dispatch table */
|
|
36
|
+
private static readonly METRIC_OPT_MAP;
|
|
37
|
+
/** Phonetic algorithm options validation dispatch table */
|
|
38
|
+
private static readonly PHONETIC_OPT_MAP;
|
|
39
|
+
/** CmpStr options validation dispatch table */
|
|
40
|
+
private static readonly CMPSTR_OPT_MAP;
|
|
41
|
+
/**
|
|
42
|
+
* Internal helper to convert a Set to a string for error messages.
|
|
43
|
+
*
|
|
44
|
+
* @param {Set< string >} set - The set to convert
|
|
45
|
+
* @returns {string} - A string representation of the set
|
|
46
|
+
*/
|
|
47
|
+
private static set2string;
|
|
48
|
+
/**
|
|
49
|
+
* Internal helper to validate primitive types.
|
|
50
|
+
*
|
|
51
|
+
* @param {unknown} value - The value to validate.
|
|
52
|
+
* @param {string} name - The name of the option (for error messages).
|
|
53
|
+
* @param {'boolean' | 'number' | 'string'} type - The expected type of the value.
|
|
54
|
+
* @throws {CmpStrValidationError} If the value is not of the expected type or is NaN (for numbers).
|
|
55
|
+
*/
|
|
56
|
+
private static validateType;
|
|
57
|
+
/**
|
|
58
|
+
* Internal helper to validate enum-like values.
|
|
59
|
+
*
|
|
60
|
+
* @param {unknown} value - The value to validate.
|
|
61
|
+
* @param {string} name - The name of the option (for error messages).
|
|
62
|
+
* @param {Set< string >} set - The set of allowed values.
|
|
63
|
+
* @throws {CmpStrValidationError} If the value is not a string or is not in the allowed set.
|
|
64
|
+
*/
|
|
65
|
+
private static validateEnum;
|
|
66
|
+
/**
|
|
67
|
+
* Internal helper to validate objects against a dispatch table of validation functions.
|
|
68
|
+
*
|
|
69
|
+
* @param {unknown} opt - The object to validate.
|
|
70
|
+
* @param {Object} map - A dispatch table mapping keys to validation functions.
|
|
71
|
+
* @throws {CmpStrValidationError} If any property in the object fails validation.
|
|
72
|
+
*/
|
|
73
|
+
private static validateMap;
|
|
74
|
+
/**
|
|
75
|
+
* Internal helper to validate registry-based options (metrics and phonetic algorithms).
|
|
76
|
+
*
|
|
77
|
+
* @param {unknown} value - The value to validate.
|
|
78
|
+
* @param {string} name - The name of the option (for error messages).
|
|
79
|
+
* @param {string} label - The label to use in error messages (e.g. "Metric" or "Phonetic algorithm").
|
|
80
|
+
* @param {( v: string ) => boolean} has - A function that checks if the registry contains a given name.
|
|
81
|
+
* @param {() => string[]} list - A function that returns a list of registered names for error messages.
|
|
82
|
+
* @throws {CmpStrValidationError} If the value is not a non-empty string or is not registered.
|
|
83
|
+
*/
|
|
84
|
+
private static validateRegistryName;
|
|
85
|
+
/**
|
|
86
|
+
* Validate boolean-like values.
|
|
87
|
+
*
|
|
88
|
+
* @param {unknown} value - The value to validate
|
|
89
|
+
* @param {string} name - The name of the option (for error messages)
|
|
90
|
+
* @throws {CmpStrValidationError} - If the value is not a boolean
|
|
91
|
+
*/
|
|
92
|
+
static validateBoolean(value: unknown, name: string): void;
|
|
93
|
+
/**
|
|
94
|
+
* Validate number-like values.
|
|
95
|
+
*
|
|
96
|
+
* @param {unknown} value - The value to validate
|
|
97
|
+
* @param {string} name - The name of the option (for error messages)
|
|
98
|
+
* @throws {CmpStrValidationError} - If the value is not a number or is NaN
|
|
99
|
+
*/
|
|
100
|
+
static validateNumber(value: unknown, name: string): void;
|
|
101
|
+
/**
|
|
102
|
+
* Validate string-like values.
|
|
103
|
+
*
|
|
104
|
+
* @param {unknown} value - The value to validate
|
|
105
|
+
* @param {string} name - The name of the option (for error messages)
|
|
106
|
+
* @throws {CmpStrValidationError} - If the value is not a string
|
|
107
|
+
*/
|
|
108
|
+
static validateString(value: unknown, name: string): void;
|
|
109
|
+
/**
|
|
110
|
+
* Validate normalization flags.
|
|
111
|
+
*
|
|
112
|
+
* @param {unknown} value - The flags to validate
|
|
113
|
+
* @throws {CmpStrValidationError} - If the flags are not a string or contain invalid characters
|
|
114
|
+
*/
|
|
115
|
+
static validateFlags(value: unknown): void;
|
|
116
|
+
/**
|
|
117
|
+
* Validate CmpStr output mode.
|
|
118
|
+
*
|
|
119
|
+
* @param {unknown} value - The output mode to validate
|
|
120
|
+
* @throws {CmpStrValidationError} - If the output mode is not a string or not allowed
|
|
121
|
+
*/
|
|
122
|
+
static validateOutput(value: unknown): void;
|
|
123
|
+
/**
|
|
124
|
+
* Validate CmpStr comparison mode.
|
|
125
|
+
*
|
|
126
|
+
* @param {unknown} value - The comparison mode to validate
|
|
127
|
+
* @throws {CmpStrValidationError} - If the comparison mode is not a string or not allowed
|
|
128
|
+
*/
|
|
129
|
+
static validateMode(value: unknown): void;
|
|
130
|
+
/**
|
|
131
|
+
* Validate CmpStr structured data sort mode.
|
|
132
|
+
*
|
|
133
|
+
* @param {unknown} value - The sort mode to validate
|
|
134
|
+
* @param {string} name - The name of the option (for error messages)
|
|
135
|
+
* @throws {CmpStrValidationError} - If the sort mode is neither 'asc', 'desc', nor a boolean
|
|
136
|
+
*/
|
|
137
|
+
static validateSort(value: unknown, name: string): void;
|
|
138
|
+
/**
|
|
139
|
+
* Validate metric name against the MetricRegistry.
|
|
140
|
+
*
|
|
141
|
+
* @param {unknown} value - The metric name to validate
|
|
142
|
+
* @throws {CmpStrValidationError} - If the metric is not a string or not registered
|
|
143
|
+
*/
|
|
144
|
+
static validateMetricName(value: unknown): void;
|
|
145
|
+
/**
|
|
146
|
+
* Validate phonetic algorithm name against the PhoneticRegistry.
|
|
147
|
+
*
|
|
148
|
+
* @param {unknown} value - The phonetic algorithm name to validate
|
|
149
|
+
* @throws {CmpStrValidationError} - If the phonetic algorithm is not a string or not registered
|
|
150
|
+
*/
|
|
151
|
+
static validatePhoneticName(value: unknown): void;
|
|
152
|
+
/**
|
|
153
|
+
* Validate metric options.
|
|
154
|
+
*
|
|
155
|
+
* @param {MetricOptions} opt - The metric options to validate
|
|
156
|
+
* @throws {CmpStrValidationError} - If any metric option is invalid
|
|
157
|
+
*/
|
|
158
|
+
static validateMetricOptions(opt?: MetricOptions): void;
|
|
159
|
+
/**
|
|
160
|
+
* Validate phonetic options.
|
|
161
|
+
*
|
|
162
|
+
* @param {PhoneticOptions} opt - The phonetic options to validate
|
|
163
|
+
* @throws {CmpStrValidationError} - If any phonetic option is invalid
|
|
164
|
+
*/
|
|
165
|
+
static validatePhoneticOptions(opt?: PhoneticOptions): void;
|
|
166
|
+
/**
|
|
167
|
+
* Validate processor options.
|
|
168
|
+
*
|
|
169
|
+
* This method iterates over the keys in the provided processor options and dispatches
|
|
170
|
+
* validation to the corresponding function in the PROCESSORS table.
|
|
171
|
+
*
|
|
172
|
+
* If an invalid processor type is found, a CmpStrValidationError is thrown indicating
|
|
173
|
+
* the invalid type and the expected processor types.
|
|
174
|
+
*
|
|
175
|
+
* @param {unknown} opt - The processor options to validate
|
|
176
|
+
* @throws {CmpStrValidationError} - If any processor type is invalid
|
|
177
|
+
*/
|
|
178
|
+
static validateProcessors(opt?: CmpStrProcessors): void;
|
|
179
|
+
/**
|
|
180
|
+
* Validate the provided CmpStr options object.
|
|
181
|
+
*
|
|
182
|
+
* This method performs a comprehensive validation of the options object passed to CmpStr.
|
|
183
|
+
* It checks for the presence and validity of all supported options, including primitive
|
|
184
|
+
* types, enum-like values, registry-based names, and nested processor options.
|
|
185
|
+
*
|
|
186
|
+
* If any validation check fails, a CmpStrValidationError is thrown with a descriptive
|
|
187
|
+
* message and relevant details about the invalid option.
|
|
188
|
+
*
|
|
189
|
+
* @param {CmpStrOptions | StructuredDataOptions} [opt] - The options object to validate
|
|
190
|
+
* @throws {CmpStrValidationError} - If any validation check fails
|
|
191
|
+
*/
|
|
192
|
+
static validateOptions(opt?: CmpStrOptions | StructuredDataOptions): void;
|
|
193
|
+
}
|
|
@@ -32,6 +32,7 @@ export declare class Profiler {
|
|
|
32
32
|
private memFn;
|
|
33
33
|
/** Store for profiler entries */
|
|
34
34
|
private store;
|
|
35
|
+
private last?;
|
|
35
36
|
/** Total time and memory consumption */
|
|
36
37
|
private totalTime;
|
|
37
38
|
private totalMem;
|
|
@@ -56,41 +57,21 @@ export declare class Profiler {
|
|
|
56
57
|
*/
|
|
57
58
|
private constructor();
|
|
58
59
|
/**
|
|
59
|
-
*
|
|
60
|
+
* Stores a profiler entry in the store and updates the total time and memory consumption.
|
|
60
61
|
*
|
|
61
|
-
*
|
|
62
|
-
* and Date.now() as a fallback.
|
|
63
|
-
*
|
|
64
|
-
* @returns {number} - Current time in milliseconds
|
|
65
|
-
*/
|
|
66
|
-
private now;
|
|
67
|
-
/**
|
|
68
|
-
* Gets the current memory usage based on the environment.
|
|
69
|
-
*
|
|
70
|
-
* Uses process.memoryUsage().heapUsed for Node.js, performance.memory.usedJSHeapSize
|
|
71
|
-
* for browsers, and returns 0 as a fallback.
|
|
72
|
-
*
|
|
73
|
-
* @returns {number} - Current memory usage in bytes
|
|
74
|
-
*/
|
|
75
|
-
private mem;
|
|
76
|
-
/**
|
|
77
|
-
* Profiles a synchronous function by measuring its execution time and memory usage.
|
|
78
|
-
*
|
|
79
|
-
* @param {() => T} fn - Function to be executed and profiled
|
|
80
|
-
* @param {Record< string, any >} meta - Metadata to be associated with the profiling entry
|
|
81
|
-
* @returns {T} - The result of the executed function
|
|
62
|
+
* @param {ProfilerEntry< T >} entry - The profiler entry to be stored
|
|
82
63
|
*/
|
|
83
|
-
private
|
|
64
|
+
private storeRes;
|
|
84
65
|
/**
|
|
85
66
|
* Enables the profiler.
|
|
86
67
|
* Sets the active state to true, allowing profiling to occur.
|
|
87
68
|
*/
|
|
88
|
-
enable
|
|
69
|
+
enable(): void;
|
|
89
70
|
/**
|
|
90
71
|
* Disables the profiler.
|
|
91
72
|
* Sets the active state to false, preventing further profiling.
|
|
92
73
|
*/
|
|
93
|
-
disable
|
|
74
|
+
disable(): void;
|
|
94
75
|
/**
|
|
95
76
|
* Resets the profiler by clearing the store, total time and memory consumption.
|
|
96
77
|
* This method is useful for starting a new profiling session.
|
|
@@ -119,19 +100,19 @@ export declare class Profiler {
|
|
|
119
100
|
*
|
|
120
101
|
* @returns {ProfilerEntry< any >[]} - An array of profiler entries
|
|
121
102
|
*/
|
|
122
|
-
getAll
|
|
103
|
+
getAll(): ProfilerEntry<any>[];
|
|
123
104
|
/**
|
|
124
105
|
* Retrieves the last profiler entry stored in the profiler.
|
|
125
106
|
*
|
|
126
107
|
* @returns {ProfilerEntry< any > | undefined} - The last profiler entry or undefined if no entries exist
|
|
127
108
|
*/
|
|
128
|
-
getLast
|
|
109
|
+
getLast(): ProfilerEntry<any> | undefined;
|
|
129
110
|
/**
|
|
130
111
|
* Retrieves the total time and memory consumption recorded by the profiler.
|
|
131
112
|
*
|
|
132
113
|
* @returns {{ time: number, mem: number }} - An object containing total time and memory usage
|
|
133
114
|
*/
|
|
134
|
-
getTotal
|
|
115
|
+
getTotal(): {
|
|
135
116
|
time: number;
|
|
136
117
|
mem: number;
|
|
137
118
|
};
|
|
@@ -29,6 +29,9 @@ import type { CmpFnResult, CmpStrOptions, MetricRaw, StructuredDataBatchResult,
|
|
|
29
29
|
export declare class StructuredData<T = any, R = MetricRaw> {
|
|
30
30
|
private readonly data;
|
|
31
31
|
private readonly key;
|
|
32
|
+
/** Sorting functions for ascending and descending order based on the 'res' property. */
|
|
33
|
+
private static readonly SORT_ASC;
|
|
34
|
+
private static readonly SORT_DESC;
|
|
32
35
|
/**
|
|
33
36
|
* Creates a new StructuredData instance for processing structured data.
|
|
34
37
|
*
|
|
@@ -79,7 +79,7 @@ export interface ProfilerService<T> {
|
|
|
79
79
|
/**
|
|
80
80
|
* PoolType enumerates the supported buffer types for the Pool utility.
|
|
81
81
|
*/
|
|
82
|
-
export type PoolType = 'int32' | 'number[]' | 'string[]' | 'set' | 'map';
|
|
82
|
+
export type PoolType = 'int32' | 'arr[]' | 'number[]' | 'string[]' | 'set' | 'map';
|
|
83
83
|
/**
|
|
84
84
|
* PoolConfig defines the configuration for a buffer pool.
|
|
85
85
|
*/
|
|
@@ -98,6 +98,18 @@ export interface PoolBuffer<T> {
|
|
|
98
98
|
buffer: T;
|
|
99
99
|
size: number;
|
|
100
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* ================================================================================
|
|
103
|
+
* VALIDATION
|
|
104
|
+
* ================================================================================
|
|
105
|
+
*
|
|
106
|
+
* Types for option validation.
|
|
107
|
+
*/
|
|
108
|
+
/**
|
|
109
|
+
* ValidatorFn defines the signature for a validation function.
|
|
110
|
+
* It takes an unknown value and either returns void if valid or throws an error if invalid.
|
|
111
|
+
*/
|
|
112
|
+
export type ValidatorFn = (v: unknown) => void;
|
|
101
113
|
/**
|
|
102
114
|
* ================================================================================
|
|
103
115
|
* NORMALIZATION & FILTERING
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "cmpstr",
|
|
3
3
|
"description": "CmpStr is a lightweight, fast and well performing package for calculating string similarity",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.3.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "komed3 (Paul Köhler)",
|
|
8
8
|
"email": "webmaster@komed3.de",
|
|
@@ -74,19 +74,28 @@
|
|
|
74
74
|
"node": ">=18.0.0"
|
|
75
75
|
},
|
|
76
76
|
"types": "./dist/types/index.d.ts",
|
|
77
|
-
"browser": "./dist/CmpStr.umd.min.js",
|
|
78
77
|
"main": "./dist/cjs/index.cjs",
|
|
79
|
-
"module": "./dist/esm/index.mjs",
|
|
80
78
|
"exports": {
|
|
81
79
|
".": {
|
|
80
|
+
"browser": "./dist/CmpStr.umd.min.js",
|
|
82
81
|
"types": "./dist/types/index.d.ts",
|
|
82
|
+
"import": "./dist/esm/index.mjs",
|
|
83
83
|
"require": "./dist/cjs/index.cjs",
|
|
84
|
-
"
|
|
84
|
+
"default": "./dist/esm/index.mjs"
|
|
85
85
|
},
|
|
86
86
|
"./root": {
|
|
87
87
|
"types": "./dist/types/root.d.ts",
|
|
88
88
|
"require": "./dist/cjs/root.cjs",
|
|
89
|
-
"import": "./dist/esm/root.mjs"
|
|
89
|
+
"import": "./dist/esm/root.mjs",
|
|
90
|
+
"default": "./dist/esm/root.mjs"
|
|
91
|
+
},
|
|
92
|
+
"./bundle": {
|
|
93
|
+
"import": "./dist/CmpStr.esm.js",
|
|
94
|
+
"default": "./dist/CmpStr.esm.js"
|
|
95
|
+
},
|
|
96
|
+
"./bundle/min": {
|
|
97
|
+
"import": "./dist/CmpStr.esm.min.js",
|
|
98
|
+
"default": "./dist/CmpStr.esm.min.js"
|
|
90
99
|
}
|
|
91
100
|
},
|
|
92
101
|
"scripts": {
|