mirror of
https://github.com/Unkn0wnCat/data-toolbox-site.git
synced 2025-06-04 01:31:36 +02:00
Add support for 0x prefix in hexadecimal
This commit is contained in:
parent
1a3c739061
commit
ca0a6cf102
3 changed files with 3 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "kevins-data-toolbox",
|
||||
"version": "2.2.2",
|
||||
"version": "2.2.3",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@loadable/component": "^5.15.0",
|
||||
|
|
|
@ -10,12 +10,10 @@
|
|||
|
||||
import { clientsClaim } from 'workbox-core';
|
||||
import { ExpirationPlugin } from 'workbox-expiration';
|
||||
import {CacheableResponsePlugin} from 'workbox-cacheable-response';
|
||||
import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching';
|
||||
import { registerRoute } from 'workbox-routing';
|
||||
import { StaleWhileRevalidate, CacheFirst } from 'workbox-strategies';
|
||||
import { StaleWhileRevalidate } from 'workbox-strategies';
|
||||
import {setCacheNameDetails} from 'workbox-core';
|
||||
import {BackgroundSyncPlugin} from 'workbox-background-sync';
|
||||
|
||||
declare const self: ServiceWorkerGlobalScope;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ const NumberBaseTool = () => {
|
|||
num = parseInt(input.replaceAll(" ", ""), 10)
|
||||
break
|
||||
case "hex":
|
||||
num = parseInt(input.replaceAll(" ", ""), 16)
|
||||
num = parseInt(input.replaceAll(" ", "").replace(/^(0x)/,''), 16)
|
||||
break
|
||||
case "oct":
|
||||
num = parseInt(input.replaceAll(" ", ""), 8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue