Skip to content

Commit 89e09af

Browse files
committed
[FIX] alphanumeric compare
1 parent 0ce71d7 commit 89e09af

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

apps/react-tools-demo/src/markdown/alphanumericCompare.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,30 @@ Function which, given two strings, the type of comparison to be verified, and op
44
## API
55

66
```tsx
7-
alphanumericCompare(string1: string, string2: string, compareType?: "<" | ">" | "=" | ">=" | "<=", opts?: Intl.CollatorOptions)
7+
alphanumericCompare({ string1, string2, compareType, locales, opts }: {string1: string, string2: string, compareType?: "<" | ">" | "=" | ">=" | "<=", locales?: Intl.LocalesArgument, opts?: Intl.CollatorOptions}): boolean|number
88
```
99

1010

1111
> ### Params
1212
>
13-
> - __string1__: _string_
13+
> - __param__: _Object_
14+
object
15+
> - __param.string1__: _string_
1416
first string to compare.
15-
> - __string2__: _string_
17+
> - __param.string2__: _string_
1618
second string to compare.
17-
> - __compareType__: _"<" | ">" | "=" | ">=" | "<="_
19+
> - __param.compareType?__: _"<" | ">" | "=" | ">=" | "<="_
1820
type of compare to verify.
19-
> - __opts__: _Intl.CollatorOptions_
20-
options object to execute compare.
21+
> - __param.locales?__: _Intl.LocalesArgument_
22+
A string with a BCP 47 language tag or an Intl.Locale instance, or an array of such locale identifiers. The runtime's default locale is used when undefined is passed or when none of the specified locale identifiers is supported.
23+
> - __param.opts?__: _Intl.CollatorOptions_
24+
An object adjusting the output format. Corresponds to the options parameter of the Intl.Collator() constructor.
2125
>
2226
2327

2428

2529
> ### Returns
2630
>
27-
> __result__: boolean that indicates whether the indicated comparison is respected or not.
28-
> - _boolean_
31+
> __result__: boolean or number that indicates whether the indicated comparison is respected or not.
32+
> - _boolean|number_
2933
>

0 commit comments

Comments
 (0)