@x-oasis/is-nan 0.1.20

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/README.md ADDED
@@ -0,0 +1,19 @@
1
+ # @x-oasis/is-nan
2
+
3
+ ## Installation
4
+
5
+ ```bash
6
+ $ npm i @x-oasis/is-nan
7
+ ```
8
+
9
+ ## How to use
10
+
11
+ ```typescript
12
+ import isNaN from '@x-oasis/is-nan'
13
+ ```
14
+
15
+ ## How to run test
16
+
17
+ ```bash
18
+ $ pnpm test
19
+ ```
@@ -0,0 +1,2 @@
1
+ declare const _default: (val: any) => boolean;
2
+ export default _default;
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+ 'use strict'
3
+
4
+ if (process.env.NODE_ENV === 'production') {
5
+ module.exports = require('./is-nan.cjs.production.min.js')
6
+ } else {
7
+ module.exports = require('./is-nan.cjs.development.js')
8
+ }
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var index = (function (val) {
6
+ return val !== val;
7
+ });
8
+
9
+ exports.default = index;
10
+ //# sourceMappingURL=is-nan.cjs.development.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-nan.cjs.development.js","sources":["../src/index.ts"],"sourcesContent":["// Built-in `isNaN` returns true for values that are not the value NaN but\n// are not numbers either\nexport default (val: any) => val !== val;\n"],"names":["val"],"mappings":";;;;AAEA,aAAe,UAACA,GAAQ;EAAA,OAAKA,GAAG,KAAKA,GAAG;AAAA;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(e){return e!=e};
2
+ //# sourceMappingURL=is-nan.cjs.production.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-nan.cjs.production.min.js","sources":["../src/index.ts"],"sourcesContent":["// Built-in `isNaN` returns true for values that are not the value NaN but\n// are not numbers either\nexport default (val: any) => val !== val;\n"],"names":["val"],"mappings":"6FAEgBA,GAAQ,OAAKA,GAAQA"}
@@ -0,0 +1,6 @@
1
+ var index = (function (val) {
2
+ return val !== val;
3
+ });
4
+
5
+ export default index;
6
+ //# sourceMappingURL=is-nan.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-nan.esm.js","sources":["../src/index.ts"],"sourcesContent":["// Built-in `isNaN` returns true for values that are not the value NaN but\n// are not numbers either\nexport default (val: any) => val !== val;\n"],"names":["val"],"mappings":"AAEA,aAAe,UAACA,GAAQ;EAAA,OAAKA,GAAG,KAAKA,GAAG;AAAA;;;;"}
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@x-oasis/is-nan",
3
+ "version": "0.1.20",
4
+ "description": "is-nan function",
5
+ "main": "dist/index.js",
6
+ "typings": "dist/index.d.ts",
7
+ "module": "dist/is-nan.esm.js",
8
+ "author": "",
9
+ "license": "ISC",
10
+ "devDependencies": {
11
+ "tsdx": "^0.14.1"
12
+ },
13
+ "dependencies": {},
14
+ "scripts": {
15
+ "build": "tsdx build --tsconfig tsconfig.build.json",
16
+ "clean": "rimraf ./dist",
17
+ "test": "vitest",
18
+ "compile": "tsc -p tsconfig.build.json"
19
+ }
20
+ }
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ // Built-in `isNaN` returns true for values that are not the value NaN but
2
+ // are not numbers either
3
+ export default (val: any) => val !== val;
@@ -0,0 +1,8 @@
1
+ import { expect, test } from 'vitest';
2
+ import isNaN from '../src';
3
+
4
+ test('vitest', async () => {
5
+ expect(isNaN(NaN)).toBe(true);
6
+ expect(isNaN(1)).toBe(false);
7
+ expect(isNaN('a')).toBe(false);
8
+ });
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "../../../tsconfig.build.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "esModuleInterop": true
6
+ },
7
+
8
+ "include": [
9
+ "src/**/*"
10
+ ]
11
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "jsx": "react",
5
+ "esModuleInterop": true
6
+ }
7
+ }