@builtwithjavascript/convert-range
Advanced tools
| export * from './convert-range'; |
@@ -1,1 +0,1 @@ | ||
| (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e["convert-range"]={}))})(this,function(e){"use strict";const n=(t,o,r=2)=>{if(typeof t!="object")throw new Error("useConvertRange EXCEPTION: invalid originalRange argument.");if(typeof o!="object")throw new Error("useConvertRange EXCEPTION: invalid targetRange argument.");return{convertRange:(f,i)=>{isNaN(i)||(r=+`${i}`);const u=t.min,d=t.max,s=o.min,a=o.max,c=(f-u)*(a-s)/(d-u)+s;return Number(c.toFixed(r))}}};e.useConvertRange=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}); | ||
| (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e["convert-range"]={}))})(this,(function(e){"use strict";const n=(t,o,r=2)=>{if(typeof t!="object")throw new Error("useConvertRange EXCEPTION: invalid originalRange argument.");if(typeof o!="object")throw new Error("useConvertRange EXCEPTION: invalid targetRange argument.");return{convertRange:(f,i)=>{isNaN(i)||(r=+`${i}`);const u=t.min,d=t.max,s=o.min,a=o.max,c=(f-u)*(a-s)/(d-u)+s;return Number(c.toFixed(r))}}};e.useConvertRange=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); |
+15
-22
| { | ||
| "name": "@builtwithjavascript/convert-range", | ||
| "version": "1.0.0", | ||
| "version": "1.1.1", | ||
| "description": "Starter kit for component library using Vite with TypeScript (just JS, no frameworks or libraries)", | ||
@@ -21,4 +21,4 @@ "author": "Damiano Fusco", | ||
| "dev": "vite", | ||
| "build-types": "tsc src/main.ts --esModuleInterop --declaration --emitDeclarationOnly --outDir dist", | ||
| "build": "tsc --esModuleInterop && vite build && npm run build-types", | ||
| "build-types": "tsc src/index.ts --esModuleInterop --declaration --emitDeclarationOnly --outDir dist", | ||
| "build": "npm run pretty; tsc --esModuleInterop && vite build && npm run build-types", | ||
| "pub": "npm publish --access public", | ||
@@ -33,18 +33,9 @@ "test": "TESTING=true vitest run", | ||
| }, | ||
| "husky": { | ||
| "hooks": { | ||
| "pre-commit": "pretty-quick --staged \"./src/**/*.ts\"" | ||
| } | ||
| }, | ||
| "devDependencies": { | ||
| "@types/jest": "^29.5.11", | ||
| "@types/node": "^20.11.5", | ||
| "husky": "^8.0.3", | ||
| "jsdom": "^24.0.0", | ||
| "prettier": "^3.2.4", | ||
| "pretty-quick": "^4.0.0", | ||
| "ts-node": "^10.9.2", | ||
| "typescript": "^5.3.3", | ||
| "vite": "^5.0.12", | ||
| "vitest": "^1.2.1" | ||
| "@types/node": "^24.4.0", | ||
| "jsdom": "^27.0.0", | ||
| "prettier": "^3.6.2", | ||
| "typescript": "^5.9.2", | ||
| "vite": "^7.1.5", | ||
| "vitest": "^3.2.4" | ||
| }, | ||
@@ -56,15 +47,17 @@ "files": [ | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "import": { | ||
| "types": "./dist/convert-range/index.d.ts", | ||
| "types": "./dist/index.d.ts", | ||
| "default": "./dist/convert-range.es.js" | ||
| }, | ||
| "require": { | ||
| "types": "./dist/convert-range/index.d.ts", | ||
| "types": "./dist/index.d.ts", | ||
| "default": "./dist/convert-range.umd.js" | ||
| } | ||
| } | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
| "types": "./dist/convert-range/index.d.ts", | ||
| "types": "./dist/index.d.ts", | ||
| "main": "./dist/convert-range.umd.js", | ||
| "module": "./dist/convert-range.es.js" | ||
| } |
| export * from './convert-range'; |
6
-40%4537
-3.41%