@x-oasis/is-clamped 0.0.7

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.
@@ -0,0 +1 @@
1
+ export default function isClamped(min: number, value: number, max: number): boolean;
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-clamped.cjs.production.min.js')
6
+ } else {
7
+ module.exports = require('./is-clamped.cjs.development.js')
8
+ }
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ function isClamped(min, value, max) {
6
+ if (value >= min && value <= max) return true;
7
+ return false;
8
+ }
9
+
10
+ exports.default = isClamped;
11
+ //# sourceMappingURL=is-clamped.cjs.development.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-clamped.cjs.development.js","sources":["../src/index.ts"],"sourcesContent":["export default function isClamped(min: number, value: number, max: number) {\n if (value >= min && value <= max) return true;\n return false;\n}"],"names":["isClamped","min","value","max"],"mappings":";;;;SAAwBA,SAASA,CAACC,GAAW,EAAEC,KAAa,EAAEC,GAAW;EACvE,IAAID,KAAK,IAAID,GAAG,IAAIC,KAAK,IAAIC,GAAG,EAAE,OAAO,IAAI;EAC7C,OAAO,KAAK;AACd;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(e,t,r){return t>=e&&t<=r};
2
+ //# sourceMappingURL=is-clamped.cjs.production.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-clamped.cjs.production.min.js","sources":["../src/index.ts"],"sourcesContent":["export default function isClamped(min: number, value: number, max: number) {\n if (value >= min && value <= max) return true;\n return false;\n}"],"names":["min","value","max"],"mappings":"6FAAkCA,EAAaC,EAAeC,GAC5D,OAAID,GAASD,GAAOC,GAASC"}
@@ -0,0 +1,7 @@
1
+ function isClamped(min, value, max) {
2
+ if (value >= min && value <= max) return true;
3
+ return false;
4
+ }
5
+
6
+ export default isClamped;
7
+ //# sourceMappingURL=is-clamped.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-clamped.esm.js","sources":["../src/index.ts"],"sourcesContent":["export default function isClamped(min: number, value: number, max: number) {\n if (value >= min && value <= max) return true;\n return false;\n}"],"names":["isClamped","min","value","max"],"mappings":"SAAwBA,SAASA,CAACC,GAAW,EAAEC,KAAa,EAAEC,GAAW;EACvE,IAAID,KAAK,IAAID,GAAG,IAAIC,KAAK,IAAIC,GAAG,EAAE,OAAO,IAAI;EAC7C,OAAO,KAAK;AACd;;;;"}
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@x-oasis/is-clamped",
3
+ "version": "0.0.7",
4
+ "description": "clamped function",
5
+ "main": "dist/index.js",
6
+ "typings": "dist/index.d.ts",
7
+ "module": "dist/is-clamped.esm.js",
8
+ "author": "",
9
+ "license": "ISC",
10
+ "devDependencies": {
11
+ "tsdx": "^0.14.1"
12
+ },
13
+ "scripts": {
14
+ "build": "tsdx build --tsconfig tsconfig.build.json",
15
+ "clean": "rimraf ./dist",
16
+ "test": "vitest",
17
+ "compile": "tsc -p tsconfig.build.json"
18
+ }
19
+ }
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ export default function isClamped(min: number, value: number, max: number) {
2
+ if (value >= min && value <= max) return true;
3
+ return false;
4
+ }
@@ -0,0 +1,5 @@
1
+ import { expect, test } from 'vitest'
2
+
3
+ test('vitest', async () => {
4
+ expect('vitest').toBe('vitest')
5
+ })
@@ -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
+ }