@x-oasis/is 0.1.36 → 0.1.37
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/CHANGELOG.md +6 -0
- package/package.json +6 -2
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x-oasis/is",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.37",
|
|
4
4
|
"description": "is function",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"module": "dist/is.esm.js",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
8
11
|
"author": "",
|
|
9
12
|
"license": "ISC",
|
|
10
13
|
"devDependencies": {
|
|
@@ -15,6 +18,7 @@
|
|
|
15
18
|
"build": "tsdx build --tsconfig tsconfig.build.json",
|
|
16
19
|
"clean": "rimraf ./dist",
|
|
17
20
|
"test": "vitest",
|
|
18
|
-
"compile": "tsc -p tsconfig.build.json"
|
|
21
|
+
"compile": "tsc -p tsconfig.build.json",
|
|
22
|
+
"prepublish": "npm run build"
|
|
19
23
|
}
|
|
20
24
|
}
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ export default (x: any, y: any) => {
|
|
|
8
8
|
// Steps 1-5, 7-10
|
|
9
9
|
// Steps 6.b-6.e: +0 != -0
|
|
10
10
|
// Added the nonzero y check to make Flow happy, but it is redundant
|
|
11
|
-
return
|
|
11
|
+
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
12
12
|
}
|
|
13
13
|
// Step 6.a: NaN == NaN
|
|
14
14
|
return x !== x && y !== y;
|