Skip to content

Commit 251e641

Browse files
committed
fix: use equal function from @softwareventures/ordered as defaultEqual function
1 parent 427f758 commit 251e641

File tree

3 files changed

+83
-76
lines changed

3 files changed

+83
-76
lines changed

index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import {isNotNull, isNull} from "@softwareventures/nullable";
22
import type {Comparator} from "@softwareventures/ordered";
3-
import {compare as defaultCompare, Comparison} from "@softwareventures/ordered";
3+
import {
4+
compare as defaultCompare,
5+
Comparison,
6+
equal as defaultEqual
7+
} from "@softwareventures/ordered";
48

59
// eslint-disable-next-line @typescript-eslint/unbound-method
610
const nativeSlice = Array.prototype.slice;
@@ -280,10 +284,6 @@ export function prefixMatchFn<T>(
280284
return a => prefixMatch(a, b, elementsEqual);
281285
}
282286

283-
function defaultEqual(a: unknown, b: unknown): boolean {
284-
return a === b;
285-
}
286-
287287
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
288288
// @ts-ignore duplicate identifier: This is the exported declaration, the implementation is below.
289289
export function map<T, U>(array: ArrayLike<T>, f: (element: T, index: number) => U): U[];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"dependencies": {
2929
"@softwareventures/nullable": "^1.0.0 || ^1.0.0 || ^1.2.1 || ^2.0.0",
30-
"@softwareventures/ordered": "^0.2.0 || ^1.0.0",
30+
"@softwareventures/ordered": "^1.1.0",
3131
"tslib": "^2.0.0"
3232
},
3333
"devDependencies": {

yarn.lock

Lines changed: 77 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,13 @@
565565
dependencies:
566566
tslib "^1.9.3 || ^2.0.0 || ^2.1.0"
567567

568+
"@softwareventures/ordered@^1.1.0":
569+
version "1.1.0"
570+
resolved "https://registry.yarnpkg.com/@softwareventures/ordered/-/ordered-1.1.0.tgz#5bd8929574d309738f6bcccaa017557979a4e303"
571+
integrity sha512-XkoiEiTiLhDnDHYKmDobtoNlqYEmK/LK/FOeKzfIOB8Xfl9+Q6toDxSasB+T6coOZiJ0GA23XFsSkh0grC2Nng==
572+
dependencies:
573+
tslib "^1.9.3 || ^2.0.0 || ^2.1.0"
574+
568575
"@softwareventures/[email protected]":
569576
version "2.0.22"
570577
resolved "https://registry.yarnpkg.com/@softwareventures/precise-commits/-/precise-commits-2.0.22.tgz#de243e9cf2a28ec28632ab404d7f4489b80a8c5e"
@@ -3854,76 +3861,76 @@ npm@^7.0.0:
38543861
resolved "https://registry.yarnpkg.com/npm/-/npm-7.24.2.tgz#861117af8241bea592289f22407230e5300e59ca"
38553862
integrity sha512-120p116CE8VMMZ+hk8IAb1inCPk4Dj3VZw29/n2g6UI77urJKVYb7FZUDW8hY+EBnfsjI/2yrobBgFyzo7YpVQ==
38563863
dependencies:
3857-
"@isaacs/string-locale-compare" "*"
3858-
"@npmcli/arborist" "*"
3859-
"@npmcli/ci-detect" "*"
3860-
"@npmcli/config" "*"
3861-
"@npmcli/map-workspaces" "*"
3862-
"@npmcli/package-json" "*"
3863-
"@npmcli/run-script" "*"
3864-
abbrev "*"
3865-
ansicolors "*"
3866-
ansistyles "*"
3867-
archy "*"
3868-
cacache "*"
3869-
chalk "*"
3870-
chownr "*"
3871-
cli-columns "*"
3872-
cli-table3 "*"
3873-
columnify "*"
3874-
fastest-levenshtein "*"
3875-
glob "*"
3876-
graceful-fs "*"
3877-
hosted-git-info "*"
3878-
ini "*"
3879-
init-package-json "*"
3880-
is-cidr "*"
3881-
json-parse-even-better-errors "*"
3882-
libnpmaccess "*"
3883-
libnpmdiff "*"
3884-
libnpmexec "*"
3885-
libnpmfund "*"
3886-
libnpmhook "*"
3887-
libnpmorg "*"
3888-
libnpmpack "*"
3889-
libnpmpublish "*"
3890-
libnpmsearch "*"
3891-
libnpmteam "*"
3892-
libnpmversion "*"
3893-
make-fetch-happen "*"
3894-
minipass "*"
3895-
minipass-pipeline "*"
3896-
mkdirp "*"
3897-
mkdirp-infer-owner "*"
3898-
ms "*"
3899-
node-gyp "*"
3900-
nopt "*"
3901-
npm-audit-report "*"
3902-
npm-install-checks "*"
3903-
npm-package-arg "*"
3904-
npm-pick-manifest "*"
3905-
npm-profile "*"
3906-
npm-registry-fetch "*"
3907-
npm-user-validate "*"
3908-
npmlog "*"
3909-
opener "*"
3910-
pacote "*"
3911-
parse-conflict-json "*"
3912-
qrcode-terminal "*"
3913-
read "*"
3914-
read-package-json "*"
3915-
read-package-json-fast "*"
3916-
readdir-scoped-modules "*"
3917-
rimraf "*"
3918-
semver "*"
3919-
ssri "*"
3920-
tar "*"
3921-
text-table "*"
3922-
tiny-relative-date "*"
3923-
treeverse "*"
3924-
validate-npm-package-name "*"
3925-
which "*"
3926-
write-file-atomic "*"
3864+
"@isaacs/string-locale-compare" "^1.1.0"
3865+
"@npmcli/arborist" "^2.9.0"
3866+
"@npmcli/ci-detect" "^1.2.0"
3867+
"@npmcli/config" "^2.3.0"
3868+
"@npmcli/map-workspaces" "^1.0.4"
3869+
"@npmcli/package-json" "^1.0.1"
3870+
"@npmcli/run-script" "^1.8.6"
3871+
abbrev "~1.1.1"
3872+
ansicolors "~0.3.2"
3873+
ansistyles "~0.1.3"
3874+
archy "~1.0.0"
3875+
cacache "^15.3.0"
3876+
chalk "^4.1.2"
3877+
chownr "^2.0.0"
3878+
cli-columns "^3.1.2"
3879+
cli-table3 "^0.6.0"
3880+
columnify "~1.5.4"
3881+
fastest-levenshtein "^1.0.12"
3882+
glob "^7.2.0"
3883+
graceful-fs "^4.2.8"
3884+
hosted-git-info "^4.0.2"
3885+
ini "^2.0.0"
3886+
init-package-json "^2.0.5"
3887+
is-cidr "^4.0.2"
3888+
json-parse-even-better-errors "^2.3.1"
3889+
libnpmaccess "^4.0.2"
3890+
libnpmdiff "^2.0.4"
3891+
libnpmexec "^2.0.1"
3892+
libnpmfund "^1.1.0"
3893+
libnpmhook "^6.0.2"
3894+
libnpmorg "^2.0.2"
3895+
libnpmpack "^2.0.1"
3896+
libnpmpublish "^4.0.1"
3897+
libnpmsearch "^3.1.1"
3898+
libnpmteam "^2.0.3"
3899+
libnpmversion "^1.2.1"
3900+
make-fetch-happen "^9.1.0"
3901+
minipass "^3.1.3"
3902+
minipass-pipeline "^1.2.4"
3903+
mkdirp "^1.0.4"
3904+
mkdirp-infer-owner "^2.0.0"
3905+
ms "^2.1.2"
3906+
node-gyp "^7.1.2"
3907+
nopt "^5.0.0"
3908+
npm-audit-report "^2.1.5"
3909+
npm-install-checks "^4.0.0"
3910+
npm-package-arg "^8.1.5"
3911+
npm-pick-manifest "^6.1.1"
3912+
npm-profile "^5.0.3"
3913+
npm-registry-fetch "^11.0.0"
3914+
npm-user-validate "^1.0.1"
3915+
npmlog "^5.0.1"
3916+
opener "^1.5.2"
3917+
pacote "^11.3.5"
3918+
parse-conflict-json "^1.1.1"
3919+
qrcode-terminal "^0.12.0"
3920+
read "~1.0.7"
3921+
read-package-json "^4.1.1"
3922+
read-package-json-fast "^2.0.3"
3923+
readdir-scoped-modules "^1.1.0"
3924+
rimraf "^3.0.2"
3925+
semver "^7.3.5"
3926+
ssri "^8.0.1"
3927+
tar "^6.1.11"
3928+
text-table "~0.2.0"
3929+
tiny-relative-date "^1.3.0"
3930+
treeverse "^1.0.4"
3931+
validate-npm-package-name "~3.0.0"
3932+
which "^2.0.2"
3933+
write-file-atomic "^3.0.3"
39273934

39283935
npmlog@*, npmlog@^6.0.0, npmlog@^6.0.2:
39293936
version "6.0.2"

0 commit comments

Comments
 (0)