mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 08:46:15 -04:00
chore(deps): update dependency @antfu/eslint-config to ^0.40.0 (#552)
* chore(deps): update dependency @antfu/eslint-config to ^0.40.0 * chore(deps): updated eslint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
parent
a2b9b157e5
commit
6ff9a01cc8
13 changed files with 349 additions and 409 deletions
|
@ -92,7 +92,7 @@ const inputLabelAlignmentConfig = {
|
|||
v-bind="inputLabelAlignmentConfig"
|
||||
/>
|
||||
|
||||
<div divider my-16px />
|
||||
<div my-16px divider />
|
||||
|
||||
<InputCopyable
|
||||
v-for="format in formats"
|
||||
|
|
|
@ -82,7 +82,7 @@ const formats: DateFormat[] = [
|
|||
{
|
||||
name: 'Mongo ObjectID',
|
||||
fromDate: date => `${Math.floor(date.getTime() / 1000).toString(16)}0000000000000000`,
|
||||
toDate: objectId => new Date(parseInt(objectId.substring(0, 8), 16) * 1000),
|
||||
toDate: objectId => new Date(Number.parseInt(objectId.substring(0, 8), 16) * 1000),
|
||||
formatMatcher: date => isMongoObjectId(date),
|
||||
},
|
||||
];
|
||||
|
|
|
@ -29,7 +29,7 @@ const { copy } = useCopy();
|
|||
Unicode: <span border="1px solid current op-30" b-rd-xl px-12px py-4px>{{ emojiInfo.unicode }}</span>
|
||||
</div> -->
|
||||
|
||||
<div flex gap-2 font-mono text-xs op-70>
|
||||
<div flex gap-2 text-xs font-mono op-70>
|
||||
<span cursor-pointer transition hover:text-primary @click="copy(emojiInfo.codePoints, { notificationMessage: `Code points '${emojiInfo.codePoints}' copied to the clipboard` })">
|
||||
{{ emojiInfo.codePoints }}
|
||||
</span>
|
||||
|
|
|
@ -2,6 +2,6 @@ export function convertHexToBin(hex: string) {
|
|||
return hex
|
||||
.trim()
|
||||
.split('')
|
||||
.map(byte => parseInt(byte, 16).toString(2).padStart(4, '0'))
|
||||
.map(byte => Number.parseInt(byte, 16).toString(2).padStart(4, '0'))
|
||||
.join('');
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ function ipv4ToIpv6({ ip, prefix = '0000:0000:0000:0000:0000:ffff:' }: { ip: str
|
|||
+ _.chain(ip)
|
||||
.trim()
|
||||
.split('.')
|
||||
.map(part => parseInt(part).toString(16).padStart(2, '0'))
|
||||
.map(part => Number.parseInt(part).toString(16).padStart(2, '0'))
|
||||
.chunk(2)
|
||||
.map(blocks => blocks.join(''))
|
||||
.join(':')
|
||||
|
|
|
@ -13,7 +13,7 @@ function getRangesize(start: string, end: string) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
return 1 + parseInt(end, 2) - parseInt(start, 2);
|
||||
return 1 + Number.parseInt(end, 2) - Number.parseInt(start, 2);
|
||||
}
|
||||
|
||||
function getCidr(start: string, end: string) {
|
||||
|
@ -55,8 +55,8 @@ function calculateCidr({ startIp, endIp }: { startIp: string; endIp: string }) {
|
|||
const cidr = getCidr(start, end);
|
||||
if (cidr != null) {
|
||||
const result: Ipv4RangeExpanderResult = {};
|
||||
result.newEnd = bits2ip(parseInt(cidr.end, 2));
|
||||
result.newStart = bits2ip(parseInt(cidr.start, 2));
|
||||
result.newEnd = bits2ip(Number.parseInt(cidr.end, 2));
|
||||
result.newStart = bits2ip(Number.parseInt(cidr.start, 2));
|
||||
result.newCidr = `${result.newStart}/${cidr.mask}`;
|
||||
result.newSize = getRangesize(cidr.start, cidr.end);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ export {
|
|||
};
|
||||
|
||||
function hexToBytes(hex: string) {
|
||||
return (hex.match(/.{1,2}/g) ?? []).map(char => parseInt(char, 16));
|
||||
return (hex.match(/.{1,2}/g) ?? []).map(char => Number.parseInt(char, 16));
|
||||
}
|
||||
|
||||
function computeHMACSha1(message: string, key: string) {
|
||||
|
@ -32,7 +32,7 @@ function base32toHex(base32: string) {
|
|||
.map(value => base32Chars.indexOf(value).toString(2).padStart(5, '0'))
|
||||
.join('');
|
||||
|
||||
const hex = (bits.match(/.{1,8}/g) ?? []).map(chunk => parseInt(chunk, 2).toString(16).padStart(2, '0')).join('');
|
||||
const hex = (bits.match(/.{1,8}/g) ?? []).map(chunk => Number.parseInt(chunk, 2).toString(16).padStart(2, '0')).join('');
|
||||
|
||||
return hex;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ export { getPasswordCrackTimeEstimation, getCharsetLength };
|
|||
|
||||
function prettifyExponentialNotation(exponentialNotation: number) {
|
||||
const [base, exponent] = exponentialNotation.toString().split('e');
|
||||
const baseAsNumber = parseFloat(base);
|
||||
const baseAsNumber = Number.parseFloat(base);
|
||||
const prettyBase = baseAsNumber % 1 === 0 ? baseAsNumber.toLocaleString() : baseAsNumber.toFixed(2);
|
||||
return exponent ? `${prettyBase}e${exponent}` : prettyBase;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue