@utilix-tech/sdk 0.1.0
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/LICENSE +21 -0
- package/README.md +199 -0
- package/dist/api-8aZtWhSj.d.cts +308 -0
- package/dist/api-8aZtWhSj.d.ts +308 -0
- package/dist/chunk-2CJSLYWI.js +520 -0
- package/dist/chunk-3BAHSW4C.js +1385 -0
- package/dist/chunk-6YPV2AB5.js +1246 -0
- package/dist/chunk-BPVAB4P2.js +1126 -0
- package/dist/chunk-FL53T24A.js +257 -0
- package/dist/chunk-L6KCTHUW.js +1086 -0
- package/dist/chunk-MLKGABMK.js +7 -0
- package/dist/chunk-ROTPLW7T.js +265 -0
- package/dist/chunk-TSAGO3XP.js +1253 -0
- package/dist/chunk-UC656APA.js +1080 -0
- package/dist/chunk-W4UBLYFU.js +1219 -0
- package/dist/chunk-XST6X3HT.js +896 -0
- package/dist/chunk-XXYZLLHI.js +2227 -0
- package/dist/chunk-ZKL2VX2G.js +2215 -0
- package/dist/chunk-ZPQZEIXP.js +685 -0
- package/dist/code-QNrdLIR3.d.cts +327 -0
- package/dist/code-QNrdLIR3.d.ts +327 -0
- package/dist/color-tPwZCr9H.d.cts +229 -0
- package/dist/color-tPwZCr9H.d.ts +229 -0
- package/dist/css-Cf7AMGM-.d.cts +318 -0
- package/dist/css-Cf7AMGM-.d.ts +318 -0
- package/dist/data-rMjWNiOJ.d.cts +215 -0
- package/dist/data-rMjWNiOJ.d.ts +215 -0
- package/dist/encoding-7gmq-vkV.d.cts +108 -0
- package/dist/encoding-7gmq-vkV.d.ts +108 -0
- package/dist/generators-BGtRGpJZ.d.cts +118 -0
- package/dist/generators-BGtRGpJZ.d.ts +118 -0
- package/dist/hashing-CnetQFD_.d.cts +76 -0
- package/dist/hashing-CnetQFD_.d.ts +76 -0
- package/dist/index.cjs +15466 -0
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +20 -0
- package/dist/json-BjSoIS1h.d.cts +198 -0
- package/dist/json-BjSoIS1h.d.ts +198 -0
- package/dist/misc-DcVBManm.d.cts +201 -0
- package/dist/misc-DcVBManm.d.ts +201 -0
- package/dist/network-CNtmrDeN.d.cts +170 -0
- package/dist/network-CNtmrDeN.d.ts +170 -0
- package/dist/text-DqAjPtQ0.d.cts +319 -0
- package/dist/text-DqAjPtQ0.d.ts +319 -0
- package/dist/time-DbT8fjaF.d.cts +145 -0
- package/dist/time-DbT8fjaF.d.ts +145 -0
- package/dist/tools/api.cjs +1216 -0
- package/dist/tools/api.d.cts +1 -0
- package/dist/tools/api.d.ts +1 -0
- package/dist/tools/api.js +2 -0
- package/dist/tools/code.cjs +2212 -0
- package/dist/tools/code.d.cts +1 -0
- package/dist/tools/code.d.ts +1 -0
- package/dist/tools/code.js +2 -0
- package/dist/tools/color.cjs +1122 -0
- package/dist/tools/color.d.cts +1 -0
- package/dist/tools/color.d.ts +1 -0
- package/dist/tools/color.js +2 -0
- package/dist/tools/css.cjs +1242 -0
- package/dist/tools/css.d.cts +1 -0
- package/dist/tools/css.d.ts +1 -0
- package/dist/tools/css.js +2 -0
- package/dist/tools/data.cjs +1097 -0
- package/dist/tools/data.d.cts +1 -0
- package/dist/tools/data.d.ts +1 -0
- package/dist/tools/data.js +2 -0
- package/dist/tools/encoding.cjs +261 -0
- package/dist/tools/encoding.d.cts +1 -0
- package/dist/tools/encoding.d.ts +1 -0
- package/dist/tools/encoding.js +2 -0
- package/dist/tools/generators.cjs +521 -0
- package/dist/tools/generators.d.cts +1 -0
- package/dist/tools/generators.d.ts +1 -0
- package/dist/tools/generators.js +2 -0
- package/dist/tools/hashing.cjs +259 -0
- package/dist/tools/hashing.d.cts +1 -0
- package/dist/tools/hashing.d.ts +1 -0
- package/dist/tools/hashing.js +2 -0
- package/dist/tools/json.cjs +1270 -0
- package/dist/tools/json.d.cts +1 -0
- package/dist/tools/json.d.ts +1 -0
- package/dist/tools/json.js +2 -0
- package/dist/tools/misc.cjs +1082 -0
- package/dist/tools/misc.d.cts +1 -0
- package/dist/tools/misc.d.ts +1 -0
- package/dist/tools/misc.js +2 -0
- package/dist/tools/network.cjs +1381 -0
- package/dist/tools/network.d.cts +1 -0
- package/dist/tools/network.d.ts +1 -0
- package/dist/tools/network.js +2 -0
- package/dist/tools/text.cjs +2224 -0
- package/dist/tools/text.d.cts +1 -0
- package/dist/tools/text.d.ts +1 -0
- package/dist/tools/text.js +2 -0
- package/dist/tools/time.cjs +681 -0
- package/dist/tools/time.d.cts +1 -0
- package/dist/tools/time.d.ts +1 -0
- package/dist/tools/time.js +2 -0
- package/dist/tools/units.cjs +892 -0
- package/dist/tools/units.d.cts +1 -0
- package/dist/tools/units.d.ts +1 -0
- package/dist/tools/units.js +2 -0
- package/dist/units-6lwDYBvX.d.cts +302 -0
- package/dist/units-6lwDYBvX.d.ts +302 -0
- package/package.json +148 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { A as AspectRatioResult, B as BASE_LABELS, a as BASE_PREFIXES, b as BYTE_UNITS, c as BaseConvertResult, d as ByteConvertResult, e as ByteUnit, C as COMMON_CURRENCIES, f as COMMON_LOCALES, g as COMMON_PERMISSIONS, h as COMMON_RATIOS, i as COMMON_SIZES, j as COMMON_VIEWPORTS, D as Dimensions, F as FilePermissions, k as FormatOptions, I as IpConversion, N as NotationStyle, l as NumberBase, P as Permission, m as PxConvertResult, S as SemverVersion, n as SubnetInfo, V as ViewportConvertResult, o as autoFormat, p as bumpVersion, q as calcAspectRatio, r as calcSubnet, s as compareSemver, t as convert, v as convertBytes, w as convertIp, x as coverBox, y as decimalToIp, z as decimalToIpCidr, E as describePermissions, G as fitIntoBox, H as formatNumber, J as formatValue, K as formatVwValue, L as formatWithSeparator, M as gcd, O as ipFromBinary, Q as ipFromDecimal, R as ipFromHex, T as ipToBinary, U as ipToDecimal, W as ipToDecimalCidr, X as ipToHex, Y as ipToOctal, Z as isValid, _ as isValidCidr, $ as isValidIp, a0 as isValidIpv4, a1 as octalToPermissions, a2 as parseFileSize, a3 as parseInput, a4 as parseNumberString, a5 as parseSemver, a6 as permissionsToChmod, a7 as permissionsToOctal, a8 as permissionsToSymbolic, a9 as ptToPx, aa as pxToAll, ab as pxToViewport, ac as remToPx, ad as satisfiesRange, ae as scaleByHeight, af as scaleByWidth, ag as sortVersions, ah as splitSubnet, ai as symbolicToPermissions, aj as viewportToPx } from '../units-6lwDYBvX.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { A as AspectRatioResult, B as BASE_LABELS, a as BASE_PREFIXES, b as BYTE_UNITS, c as BaseConvertResult, d as ByteConvertResult, e as ByteUnit, C as COMMON_CURRENCIES, f as COMMON_LOCALES, g as COMMON_PERMISSIONS, h as COMMON_RATIOS, i as COMMON_SIZES, j as COMMON_VIEWPORTS, D as Dimensions, F as FilePermissions, k as FormatOptions, I as IpConversion, N as NotationStyle, l as NumberBase, P as Permission, m as PxConvertResult, S as SemverVersion, n as SubnetInfo, V as ViewportConvertResult, o as autoFormat, p as bumpVersion, q as calcAspectRatio, r as calcSubnet, s as compareSemver, t as convert, v as convertBytes, w as convertIp, x as coverBox, y as decimalToIp, z as decimalToIpCidr, E as describePermissions, G as fitIntoBox, H as formatNumber, J as formatValue, K as formatVwValue, L as formatWithSeparator, M as gcd, O as ipFromBinary, Q as ipFromDecimal, R as ipFromHex, T as ipToBinary, U as ipToDecimal, W as ipToDecimalCidr, X as ipToHex, Y as ipToOctal, Z as isValid, _ as isValidCidr, $ as isValidIp, a0 as isValidIpv4, a1 as octalToPermissions, a2 as parseFileSize, a3 as parseInput, a4 as parseNumberString, a5 as parseSemver, a6 as permissionsToChmod, a7 as permissionsToOctal, a8 as permissionsToSymbolic, a9 as ptToPx, aa as pxToAll, ab as pxToViewport, ac as remToPx, ad as satisfiesRange, ae as scaleByHeight, af as scaleByWidth, ag as sortVersions, ah as splitSubnet, ai as symbolicToPermissions, aj as viewportToPx } from '../units-6lwDYBvX.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_VIEWPORTS, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, compareSemver, convert, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, viewportToPx } from '../chunk-XST6X3HT.js';
|
|
2
|
+
import '../chunk-MLKGABMK.js';
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @utilix/sdk — units module
|
|
3
|
+
*
|
|
4
|
+
* Tools covered:
|
|
5
|
+
* - px-rem : pxToAll, remToPx, ptToPx, formatValue, COMMON_SIZES
|
|
6
|
+
* - px-vw : pxToViewport, viewportToPx, formatVwValue, COMMON_VIEWPORTS
|
|
7
|
+
* - byte-converter : convertBytes, autoFormat, parseFileSize, BYTE_UNITS
|
|
8
|
+
* - number-base : convert, parseInput, formatWithSeparator, BASE_PREFIXES, BASE_LABELS
|
|
9
|
+
* - number-formatter : formatNumber, parseNumberString, COMMON_LOCALES, COMMON_CURRENCIES
|
|
10
|
+
* - aspect-ratio : calcAspectRatio, gcd, scaleByWidth, scaleByHeight, fitIntoBox, coverBox, COMMON_RATIOS
|
|
11
|
+
* - chmod-calc : octalToPermissions, permissionsToOctal, symbolicToPermissions, permissionsToSymbolic, permissionsToChmod, describePermissions, COMMON_PERMISSIONS
|
|
12
|
+
* - ip-converter : convertIp, isValidIpv4, ipToDecimal, decimalToIp, ipToHex, ipToBinary, ipToOctal, ipFromHex, ipFromBinary, ipFromDecimal
|
|
13
|
+
* - cidr-calc : calcSubnet, splitSubnet, isValidCidr, isValidIp, ipToDecimal (cidr), decimalToIp (cidr)
|
|
14
|
+
* - semver : parseSemver, isValid, compareSemver, satisfiesRange, bumpVersion, sortVersions
|
|
15
|
+
*/
|
|
16
|
+
interface PxConvertResult {
|
|
17
|
+
px: number;
|
|
18
|
+
rem: number;
|
|
19
|
+
em: number;
|
|
20
|
+
pt: number;
|
|
21
|
+
vw: number;
|
|
22
|
+
vh: number;
|
|
23
|
+
}
|
|
24
|
+
declare function pxToAll(px: number, baseFontSize?: number, viewportWidth?: number, viewportHeight?: number): PxConvertResult;
|
|
25
|
+
declare function remToPx(rem: number, baseFontSize?: number): number;
|
|
26
|
+
declare function ptToPx(pt: number): number;
|
|
27
|
+
declare function formatValue(value: number, unit: string, decimals?: number): string;
|
|
28
|
+
declare const COMMON_SIZES: Array<{
|
|
29
|
+
px: number;
|
|
30
|
+
label: string;
|
|
31
|
+
}>;
|
|
32
|
+
interface ViewportConvertResult {
|
|
33
|
+
px: number;
|
|
34
|
+
vw: number;
|
|
35
|
+
vh: number;
|
|
36
|
+
vmin: number;
|
|
37
|
+
vmax: number;
|
|
38
|
+
percent: number;
|
|
39
|
+
}
|
|
40
|
+
declare function pxToViewport(px: number, viewportWidth?: number, viewportHeight?: number): ViewportConvertResult;
|
|
41
|
+
declare function viewportToPx(vw: number, viewportWidth?: number): number;
|
|
42
|
+
declare const COMMON_VIEWPORTS: Array<{
|
|
43
|
+
label: string;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
}>;
|
|
47
|
+
declare function formatVwValue(value: number, decimals?: number): string;
|
|
48
|
+
type ByteUnit = "B" | "KB" | "MB" | "GB" | "TB" | "PB" | "KiB" | "MiB" | "GiB" | "TiB";
|
|
49
|
+
declare const BYTE_UNITS: ByteUnit[];
|
|
50
|
+
interface ByteConvertResult {
|
|
51
|
+
value: number;
|
|
52
|
+
unit: ByteUnit;
|
|
53
|
+
formatted: string;
|
|
54
|
+
}
|
|
55
|
+
declare function convertBytes(value: number, fromUnit: ByteUnit): Record<ByteUnit, ByteConvertResult>;
|
|
56
|
+
declare function autoFormat(bytes: number): string;
|
|
57
|
+
declare function parseFileSize(input: string): number | null;
|
|
58
|
+
type NumberBase = 2 | 8 | 10 | 16;
|
|
59
|
+
interface BaseConvertResult {
|
|
60
|
+
binary: string;
|
|
61
|
+
octal: string;
|
|
62
|
+
decimal: string;
|
|
63
|
+
hex: string;
|
|
64
|
+
error?: string;
|
|
65
|
+
}
|
|
66
|
+
declare const BASE_PREFIXES: Record<NumberBase, string>;
|
|
67
|
+
declare const BASE_LABELS: Record<NumberBase, string>;
|
|
68
|
+
declare function parseInput(input: string, fromBase: NumberBase): {
|
|
69
|
+
value: bigint;
|
|
70
|
+
error?: string;
|
|
71
|
+
};
|
|
72
|
+
declare function convert(input: string, fromBase: NumberBase): BaseConvertResult;
|
|
73
|
+
declare function formatWithSeparator(value: string, groupSize?: number): string;
|
|
74
|
+
type NotationStyle = "decimal" | "currency" | "percent" | "scientific" | "engineering" | "compact";
|
|
75
|
+
interface FormatOptions {
|
|
76
|
+
locale: string;
|
|
77
|
+
style: NotationStyle;
|
|
78
|
+
currency?: string;
|
|
79
|
+
minimumFractionDigits?: number;
|
|
80
|
+
maximumFractionDigits?: number;
|
|
81
|
+
useGrouping?: boolean;
|
|
82
|
+
}
|
|
83
|
+
declare const COMMON_LOCALES: Array<{
|
|
84
|
+
locale: string;
|
|
85
|
+
label: string;
|
|
86
|
+
example: string;
|
|
87
|
+
}>;
|
|
88
|
+
declare const COMMON_CURRENCIES: Array<{
|
|
89
|
+
code: string;
|
|
90
|
+
name: string;
|
|
91
|
+
symbol: string;
|
|
92
|
+
}>;
|
|
93
|
+
declare function formatNumber(value: number, options: FormatOptions): string | {
|
|
94
|
+
error: string;
|
|
95
|
+
};
|
|
96
|
+
declare function parseNumberString(input: string): number | {
|
|
97
|
+
error: string;
|
|
98
|
+
};
|
|
99
|
+
interface Dimensions {
|
|
100
|
+
width: number;
|
|
101
|
+
height: number;
|
|
102
|
+
}
|
|
103
|
+
interface AspectRatioResult {
|
|
104
|
+
ratio: string;
|
|
105
|
+
decimal: number;
|
|
106
|
+
percentage: number;
|
|
107
|
+
gcd: number;
|
|
108
|
+
isCommon: boolean;
|
|
109
|
+
}
|
|
110
|
+
declare const COMMON_RATIOS: Array<{
|
|
111
|
+
ratio: string;
|
|
112
|
+
decimal: number;
|
|
113
|
+
description: string;
|
|
114
|
+
}>;
|
|
115
|
+
declare function gcd(a: number, b: number): number;
|
|
116
|
+
declare function calcAspectRatio(width: number, height: number): AspectRatioResult | {
|
|
117
|
+
error: string;
|
|
118
|
+
};
|
|
119
|
+
declare function scaleByWidth(dimensions: Dimensions, newWidth: number): Dimensions;
|
|
120
|
+
declare function scaleByHeight(dimensions: Dimensions, newHeight: number): Dimensions;
|
|
121
|
+
declare function fitIntoBox(dimensions: Dimensions, box: Dimensions): Dimensions;
|
|
122
|
+
declare function coverBox(dimensions: Dimensions, box: Dimensions): Dimensions;
|
|
123
|
+
interface Permission {
|
|
124
|
+
read: boolean;
|
|
125
|
+
write: boolean;
|
|
126
|
+
execute: boolean;
|
|
127
|
+
}
|
|
128
|
+
interface FilePermissions {
|
|
129
|
+
owner: Permission;
|
|
130
|
+
group: Permission;
|
|
131
|
+
others: Permission;
|
|
132
|
+
setuid?: boolean;
|
|
133
|
+
setgid?: boolean;
|
|
134
|
+
sticky?: boolean;
|
|
135
|
+
}
|
|
136
|
+
declare function octalToPermissions(octal: string): FilePermissions | {
|
|
137
|
+
error: string;
|
|
138
|
+
};
|
|
139
|
+
declare function permissionsToOctal(perms: FilePermissions): string;
|
|
140
|
+
declare function symbolicToPermissions(symbolic: string): FilePermissions | {
|
|
141
|
+
error: string;
|
|
142
|
+
};
|
|
143
|
+
declare function permissionsToSymbolic(perms: FilePermissions): string;
|
|
144
|
+
declare function permissionsToChmod(perms: FilePermissions): string;
|
|
145
|
+
declare function describePermissions(perms: FilePermissions): string[];
|
|
146
|
+
declare const COMMON_PERMISSIONS: Array<{
|
|
147
|
+
octal: string;
|
|
148
|
+
symbolic: string;
|
|
149
|
+
description: string;
|
|
150
|
+
use: string;
|
|
151
|
+
}>;
|
|
152
|
+
interface IpConversion {
|
|
153
|
+
dotted: string;
|
|
154
|
+
decimal: number;
|
|
155
|
+
hex: string;
|
|
156
|
+
binary: string;
|
|
157
|
+
octal: string;
|
|
158
|
+
integer: number;
|
|
159
|
+
cidrPrefix?: string;
|
|
160
|
+
}
|
|
161
|
+
declare function isValidIpv4(ip: string): boolean;
|
|
162
|
+
declare function ipToDecimal(ip: string): number;
|
|
163
|
+
declare function decimalToIp(decimal: number): string;
|
|
164
|
+
declare function ipToHex(ip: string): string;
|
|
165
|
+
declare function ipToBinary(ip: string): string;
|
|
166
|
+
declare function ipToOctal(ip: string): string;
|
|
167
|
+
declare function convertIp(ip: string): IpConversion | {
|
|
168
|
+
error: string;
|
|
169
|
+
};
|
|
170
|
+
declare function ipFromHex(hex: string): string | {
|
|
171
|
+
error: string;
|
|
172
|
+
};
|
|
173
|
+
declare function ipFromBinary(binary: string): string | {
|
|
174
|
+
error: string;
|
|
175
|
+
};
|
|
176
|
+
declare function ipFromDecimal(decimal: number): string;
|
|
177
|
+
interface SubnetInfo {
|
|
178
|
+
networkAddress: string;
|
|
179
|
+
broadcastAddress: string;
|
|
180
|
+
subnetMask: string;
|
|
181
|
+
wildcardMask: string;
|
|
182
|
+
firstHost: string;
|
|
183
|
+
lastHost: string;
|
|
184
|
+
totalHosts: number;
|
|
185
|
+
usableHosts: number;
|
|
186
|
+
prefix: number;
|
|
187
|
+
ipClass: "A" | "B" | "C" | "D" | "E" | "unknown";
|
|
188
|
+
isPrivate: boolean;
|
|
189
|
+
}
|
|
190
|
+
declare function isValidIp(ip: string): boolean;
|
|
191
|
+
declare function isValidCidr(cidr: string): boolean;
|
|
192
|
+
declare function ipToDecimalCidr(ip: string): number | {
|
|
193
|
+
error: string;
|
|
194
|
+
};
|
|
195
|
+
declare function decimalToIpCidr(decimal: number): string;
|
|
196
|
+
declare function calcSubnet(cidr: string): SubnetInfo | {
|
|
197
|
+
error: string;
|
|
198
|
+
};
|
|
199
|
+
declare function splitSubnet(cidr: string, newPrefix: number): SubnetInfo[] | {
|
|
200
|
+
error: string;
|
|
201
|
+
};
|
|
202
|
+
interface SemverVersion {
|
|
203
|
+
major: number;
|
|
204
|
+
minor: number;
|
|
205
|
+
patch: number;
|
|
206
|
+
prerelease?: string;
|
|
207
|
+
build?: string;
|
|
208
|
+
raw: string;
|
|
209
|
+
}
|
|
210
|
+
declare function parseSemver(version: string): SemverVersion | {
|
|
211
|
+
error: string;
|
|
212
|
+
};
|
|
213
|
+
declare function isValid(version: string): boolean;
|
|
214
|
+
declare function compareSemver(a: string, b: string): -1 | 0 | 1 | {
|
|
215
|
+
error: string;
|
|
216
|
+
};
|
|
217
|
+
declare function satisfiesRange(version: string, range: string): boolean | {
|
|
218
|
+
error: string;
|
|
219
|
+
};
|
|
220
|
+
declare function bumpVersion(version: string, bump: "major" | "minor" | "patch"): string | {
|
|
221
|
+
error: string;
|
|
222
|
+
};
|
|
223
|
+
declare function sortVersions(versions: string[], order?: "asc" | "desc"): string[];
|
|
224
|
+
|
|
225
|
+
type units_AspectRatioResult = AspectRatioResult;
|
|
226
|
+
declare const units_BASE_LABELS: typeof BASE_LABELS;
|
|
227
|
+
declare const units_BASE_PREFIXES: typeof BASE_PREFIXES;
|
|
228
|
+
declare const units_BYTE_UNITS: typeof BYTE_UNITS;
|
|
229
|
+
type units_BaseConvertResult = BaseConvertResult;
|
|
230
|
+
type units_ByteConvertResult = ByteConvertResult;
|
|
231
|
+
type units_ByteUnit = ByteUnit;
|
|
232
|
+
declare const units_COMMON_CURRENCIES: typeof COMMON_CURRENCIES;
|
|
233
|
+
declare const units_COMMON_LOCALES: typeof COMMON_LOCALES;
|
|
234
|
+
declare const units_COMMON_PERMISSIONS: typeof COMMON_PERMISSIONS;
|
|
235
|
+
declare const units_COMMON_RATIOS: typeof COMMON_RATIOS;
|
|
236
|
+
declare const units_COMMON_SIZES: typeof COMMON_SIZES;
|
|
237
|
+
declare const units_COMMON_VIEWPORTS: typeof COMMON_VIEWPORTS;
|
|
238
|
+
type units_Dimensions = Dimensions;
|
|
239
|
+
type units_FilePermissions = FilePermissions;
|
|
240
|
+
type units_FormatOptions = FormatOptions;
|
|
241
|
+
type units_IpConversion = IpConversion;
|
|
242
|
+
type units_NotationStyle = NotationStyle;
|
|
243
|
+
type units_NumberBase = NumberBase;
|
|
244
|
+
type units_Permission = Permission;
|
|
245
|
+
type units_PxConvertResult = PxConvertResult;
|
|
246
|
+
type units_SemverVersion = SemverVersion;
|
|
247
|
+
type units_SubnetInfo = SubnetInfo;
|
|
248
|
+
type units_ViewportConvertResult = ViewportConvertResult;
|
|
249
|
+
declare const units_autoFormat: typeof autoFormat;
|
|
250
|
+
declare const units_bumpVersion: typeof bumpVersion;
|
|
251
|
+
declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
252
|
+
declare const units_calcSubnet: typeof calcSubnet;
|
|
253
|
+
declare const units_compareSemver: typeof compareSemver;
|
|
254
|
+
declare const units_convert: typeof convert;
|
|
255
|
+
declare const units_convertBytes: typeof convertBytes;
|
|
256
|
+
declare const units_convertIp: typeof convertIp;
|
|
257
|
+
declare const units_coverBox: typeof coverBox;
|
|
258
|
+
declare const units_decimalToIp: typeof decimalToIp;
|
|
259
|
+
declare const units_decimalToIpCidr: typeof decimalToIpCidr;
|
|
260
|
+
declare const units_describePermissions: typeof describePermissions;
|
|
261
|
+
declare const units_fitIntoBox: typeof fitIntoBox;
|
|
262
|
+
declare const units_formatNumber: typeof formatNumber;
|
|
263
|
+
declare const units_formatValue: typeof formatValue;
|
|
264
|
+
declare const units_formatVwValue: typeof formatVwValue;
|
|
265
|
+
declare const units_formatWithSeparator: typeof formatWithSeparator;
|
|
266
|
+
declare const units_gcd: typeof gcd;
|
|
267
|
+
declare const units_ipFromBinary: typeof ipFromBinary;
|
|
268
|
+
declare const units_ipFromDecimal: typeof ipFromDecimal;
|
|
269
|
+
declare const units_ipFromHex: typeof ipFromHex;
|
|
270
|
+
declare const units_ipToBinary: typeof ipToBinary;
|
|
271
|
+
declare const units_ipToDecimal: typeof ipToDecimal;
|
|
272
|
+
declare const units_ipToDecimalCidr: typeof ipToDecimalCidr;
|
|
273
|
+
declare const units_ipToHex: typeof ipToHex;
|
|
274
|
+
declare const units_ipToOctal: typeof ipToOctal;
|
|
275
|
+
declare const units_isValid: typeof isValid;
|
|
276
|
+
declare const units_isValidCidr: typeof isValidCidr;
|
|
277
|
+
declare const units_isValidIp: typeof isValidIp;
|
|
278
|
+
declare const units_isValidIpv4: typeof isValidIpv4;
|
|
279
|
+
declare const units_octalToPermissions: typeof octalToPermissions;
|
|
280
|
+
declare const units_parseFileSize: typeof parseFileSize;
|
|
281
|
+
declare const units_parseInput: typeof parseInput;
|
|
282
|
+
declare const units_parseNumberString: typeof parseNumberString;
|
|
283
|
+
declare const units_parseSemver: typeof parseSemver;
|
|
284
|
+
declare const units_permissionsToChmod: typeof permissionsToChmod;
|
|
285
|
+
declare const units_permissionsToOctal: typeof permissionsToOctal;
|
|
286
|
+
declare const units_permissionsToSymbolic: typeof permissionsToSymbolic;
|
|
287
|
+
declare const units_ptToPx: typeof ptToPx;
|
|
288
|
+
declare const units_pxToAll: typeof pxToAll;
|
|
289
|
+
declare const units_pxToViewport: typeof pxToViewport;
|
|
290
|
+
declare const units_remToPx: typeof remToPx;
|
|
291
|
+
declare const units_satisfiesRange: typeof satisfiesRange;
|
|
292
|
+
declare const units_scaleByHeight: typeof scaleByHeight;
|
|
293
|
+
declare const units_scaleByWidth: typeof scaleByWidth;
|
|
294
|
+
declare const units_sortVersions: typeof sortVersions;
|
|
295
|
+
declare const units_splitSubnet: typeof splitSubnet;
|
|
296
|
+
declare const units_symbolicToPermissions: typeof symbolicToPermissions;
|
|
297
|
+
declare const units_viewportToPx: typeof viewportToPx;
|
|
298
|
+
declare namespace units {
|
|
299
|
+
export { type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BaseConvertResult as BaseConvertResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_Dimensions as Dimensions, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IpConversion as IpConversion, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_SemverVersion as SemverVersion, type units_SubnetInfo as SubnetInfo, type units_ViewportConvertResult as ViewportConvertResult, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_compareSemver as compareSemver, units_convert as convert, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_viewportToPx as viewportToPx };
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export { isValidIp as $, type AspectRatioResult as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type Dimensions as D, describePermissions as E, type FilePermissions as F, fitIntoBox as G, formatNumber as H, type IpConversion as I, formatValue as J, formatVwValue as K, formatWithSeparator as L, gcd as M, type NotationStyle as N, ipFromBinary as O, type Permission as P, ipFromDecimal as Q, ipFromHex as R, type SemverVersion as S, ipToBinary as T, ipToDecimal as U, type ViewportConvertResult as V, ipToDecimalCidr as W, ipToHex as X, ipToOctal as Y, isValid as Z, isValidCidr as _, BASE_PREFIXES as a, isValidIpv4 as a0, octalToPermissions as a1, parseFileSize as a2, parseInput as a3, parseNumberString as a4, parseSemver as a5, permissionsToChmod as a6, permissionsToOctal as a7, permissionsToSymbolic as a8, ptToPx as a9, pxToAll as aa, pxToViewport as ab, remToPx as ac, satisfiesRange as ad, scaleByHeight as ae, scaleByWidth as af, sortVersions as ag, splitSubnet as ah, symbolicToPermissions as ai, viewportToPx as aj, BYTE_UNITS as b, type BaseConvertResult as c, type ByteConvertResult as d, type ByteUnit as e, COMMON_LOCALES as f, COMMON_PERMISSIONS as g, COMMON_RATIOS as h, COMMON_SIZES as i, COMMON_VIEWPORTS as j, type FormatOptions as k, type NumberBase as l, type PxConvertResult as m, type SubnetInfo as n, autoFormat as o, bumpVersion as p, calcAspectRatio as q, calcSubnet as r, compareSemver as s, convert as t, units as u, convertBytes as v, convertIp as w, coverBox as x, decimalToIp as y, decimalToIpCidr as z };
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @utilix/sdk — units module
|
|
3
|
+
*
|
|
4
|
+
* Tools covered:
|
|
5
|
+
* - px-rem : pxToAll, remToPx, ptToPx, formatValue, COMMON_SIZES
|
|
6
|
+
* - px-vw : pxToViewport, viewportToPx, formatVwValue, COMMON_VIEWPORTS
|
|
7
|
+
* - byte-converter : convertBytes, autoFormat, parseFileSize, BYTE_UNITS
|
|
8
|
+
* - number-base : convert, parseInput, formatWithSeparator, BASE_PREFIXES, BASE_LABELS
|
|
9
|
+
* - number-formatter : formatNumber, parseNumberString, COMMON_LOCALES, COMMON_CURRENCIES
|
|
10
|
+
* - aspect-ratio : calcAspectRatio, gcd, scaleByWidth, scaleByHeight, fitIntoBox, coverBox, COMMON_RATIOS
|
|
11
|
+
* - chmod-calc : octalToPermissions, permissionsToOctal, symbolicToPermissions, permissionsToSymbolic, permissionsToChmod, describePermissions, COMMON_PERMISSIONS
|
|
12
|
+
* - ip-converter : convertIp, isValidIpv4, ipToDecimal, decimalToIp, ipToHex, ipToBinary, ipToOctal, ipFromHex, ipFromBinary, ipFromDecimal
|
|
13
|
+
* - cidr-calc : calcSubnet, splitSubnet, isValidCidr, isValidIp, ipToDecimal (cidr), decimalToIp (cidr)
|
|
14
|
+
* - semver : parseSemver, isValid, compareSemver, satisfiesRange, bumpVersion, sortVersions
|
|
15
|
+
*/
|
|
16
|
+
interface PxConvertResult {
|
|
17
|
+
px: number;
|
|
18
|
+
rem: number;
|
|
19
|
+
em: number;
|
|
20
|
+
pt: number;
|
|
21
|
+
vw: number;
|
|
22
|
+
vh: number;
|
|
23
|
+
}
|
|
24
|
+
declare function pxToAll(px: number, baseFontSize?: number, viewportWidth?: number, viewportHeight?: number): PxConvertResult;
|
|
25
|
+
declare function remToPx(rem: number, baseFontSize?: number): number;
|
|
26
|
+
declare function ptToPx(pt: number): number;
|
|
27
|
+
declare function formatValue(value: number, unit: string, decimals?: number): string;
|
|
28
|
+
declare const COMMON_SIZES: Array<{
|
|
29
|
+
px: number;
|
|
30
|
+
label: string;
|
|
31
|
+
}>;
|
|
32
|
+
interface ViewportConvertResult {
|
|
33
|
+
px: number;
|
|
34
|
+
vw: number;
|
|
35
|
+
vh: number;
|
|
36
|
+
vmin: number;
|
|
37
|
+
vmax: number;
|
|
38
|
+
percent: number;
|
|
39
|
+
}
|
|
40
|
+
declare function pxToViewport(px: number, viewportWidth?: number, viewportHeight?: number): ViewportConvertResult;
|
|
41
|
+
declare function viewportToPx(vw: number, viewportWidth?: number): number;
|
|
42
|
+
declare const COMMON_VIEWPORTS: Array<{
|
|
43
|
+
label: string;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
}>;
|
|
47
|
+
declare function formatVwValue(value: number, decimals?: number): string;
|
|
48
|
+
type ByteUnit = "B" | "KB" | "MB" | "GB" | "TB" | "PB" | "KiB" | "MiB" | "GiB" | "TiB";
|
|
49
|
+
declare const BYTE_UNITS: ByteUnit[];
|
|
50
|
+
interface ByteConvertResult {
|
|
51
|
+
value: number;
|
|
52
|
+
unit: ByteUnit;
|
|
53
|
+
formatted: string;
|
|
54
|
+
}
|
|
55
|
+
declare function convertBytes(value: number, fromUnit: ByteUnit): Record<ByteUnit, ByteConvertResult>;
|
|
56
|
+
declare function autoFormat(bytes: number): string;
|
|
57
|
+
declare function parseFileSize(input: string): number | null;
|
|
58
|
+
type NumberBase = 2 | 8 | 10 | 16;
|
|
59
|
+
interface BaseConvertResult {
|
|
60
|
+
binary: string;
|
|
61
|
+
octal: string;
|
|
62
|
+
decimal: string;
|
|
63
|
+
hex: string;
|
|
64
|
+
error?: string;
|
|
65
|
+
}
|
|
66
|
+
declare const BASE_PREFIXES: Record<NumberBase, string>;
|
|
67
|
+
declare const BASE_LABELS: Record<NumberBase, string>;
|
|
68
|
+
declare function parseInput(input: string, fromBase: NumberBase): {
|
|
69
|
+
value: bigint;
|
|
70
|
+
error?: string;
|
|
71
|
+
};
|
|
72
|
+
declare function convert(input: string, fromBase: NumberBase): BaseConvertResult;
|
|
73
|
+
declare function formatWithSeparator(value: string, groupSize?: number): string;
|
|
74
|
+
type NotationStyle = "decimal" | "currency" | "percent" | "scientific" | "engineering" | "compact";
|
|
75
|
+
interface FormatOptions {
|
|
76
|
+
locale: string;
|
|
77
|
+
style: NotationStyle;
|
|
78
|
+
currency?: string;
|
|
79
|
+
minimumFractionDigits?: number;
|
|
80
|
+
maximumFractionDigits?: number;
|
|
81
|
+
useGrouping?: boolean;
|
|
82
|
+
}
|
|
83
|
+
declare const COMMON_LOCALES: Array<{
|
|
84
|
+
locale: string;
|
|
85
|
+
label: string;
|
|
86
|
+
example: string;
|
|
87
|
+
}>;
|
|
88
|
+
declare const COMMON_CURRENCIES: Array<{
|
|
89
|
+
code: string;
|
|
90
|
+
name: string;
|
|
91
|
+
symbol: string;
|
|
92
|
+
}>;
|
|
93
|
+
declare function formatNumber(value: number, options: FormatOptions): string | {
|
|
94
|
+
error: string;
|
|
95
|
+
};
|
|
96
|
+
declare function parseNumberString(input: string): number | {
|
|
97
|
+
error: string;
|
|
98
|
+
};
|
|
99
|
+
interface Dimensions {
|
|
100
|
+
width: number;
|
|
101
|
+
height: number;
|
|
102
|
+
}
|
|
103
|
+
interface AspectRatioResult {
|
|
104
|
+
ratio: string;
|
|
105
|
+
decimal: number;
|
|
106
|
+
percentage: number;
|
|
107
|
+
gcd: number;
|
|
108
|
+
isCommon: boolean;
|
|
109
|
+
}
|
|
110
|
+
declare const COMMON_RATIOS: Array<{
|
|
111
|
+
ratio: string;
|
|
112
|
+
decimal: number;
|
|
113
|
+
description: string;
|
|
114
|
+
}>;
|
|
115
|
+
declare function gcd(a: number, b: number): number;
|
|
116
|
+
declare function calcAspectRatio(width: number, height: number): AspectRatioResult | {
|
|
117
|
+
error: string;
|
|
118
|
+
};
|
|
119
|
+
declare function scaleByWidth(dimensions: Dimensions, newWidth: number): Dimensions;
|
|
120
|
+
declare function scaleByHeight(dimensions: Dimensions, newHeight: number): Dimensions;
|
|
121
|
+
declare function fitIntoBox(dimensions: Dimensions, box: Dimensions): Dimensions;
|
|
122
|
+
declare function coverBox(dimensions: Dimensions, box: Dimensions): Dimensions;
|
|
123
|
+
interface Permission {
|
|
124
|
+
read: boolean;
|
|
125
|
+
write: boolean;
|
|
126
|
+
execute: boolean;
|
|
127
|
+
}
|
|
128
|
+
interface FilePermissions {
|
|
129
|
+
owner: Permission;
|
|
130
|
+
group: Permission;
|
|
131
|
+
others: Permission;
|
|
132
|
+
setuid?: boolean;
|
|
133
|
+
setgid?: boolean;
|
|
134
|
+
sticky?: boolean;
|
|
135
|
+
}
|
|
136
|
+
declare function octalToPermissions(octal: string): FilePermissions | {
|
|
137
|
+
error: string;
|
|
138
|
+
};
|
|
139
|
+
declare function permissionsToOctal(perms: FilePermissions): string;
|
|
140
|
+
declare function symbolicToPermissions(symbolic: string): FilePermissions | {
|
|
141
|
+
error: string;
|
|
142
|
+
};
|
|
143
|
+
declare function permissionsToSymbolic(perms: FilePermissions): string;
|
|
144
|
+
declare function permissionsToChmod(perms: FilePermissions): string;
|
|
145
|
+
declare function describePermissions(perms: FilePermissions): string[];
|
|
146
|
+
declare const COMMON_PERMISSIONS: Array<{
|
|
147
|
+
octal: string;
|
|
148
|
+
symbolic: string;
|
|
149
|
+
description: string;
|
|
150
|
+
use: string;
|
|
151
|
+
}>;
|
|
152
|
+
interface IpConversion {
|
|
153
|
+
dotted: string;
|
|
154
|
+
decimal: number;
|
|
155
|
+
hex: string;
|
|
156
|
+
binary: string;
|
|
157
|
+
octal: string;
|
|
158
|
+
integer: number;
|
|
159
|
+
cidrPrefix?: string;
|
|
160
|
+
}
|
|
161
|
+
declare function isValidIpv4(ip: string): boolean;
|
|
162
|
+
declare function ipToDecimal(ip: string): number;
|
|
163
|
+
declare function decimalToIp(decimal: number): string;
|
|
164
|
+
declare function ipToHex(ip: string): string;
|
|
165
|
+
declare function ipToBinary(ip: string): string;
|
|
166
|
+
declare function ipToOctal(ip: string): string;
|
|
167
|
+
declare function convertIp(ip: string): IpConversion | {
|
|
168
|
+
error: string;
|
|
169
|
+
};
|
|
170
|
+
declare function ipFromHex(hex: string): string | {
|
|
171
|
+
error: string;
|
|
172
|
+
};
|
|
173
|
+
declare function ipFromBinary(binary: string): string | {
|
|
174
|
+
error: string;
|
|
175
|
+
};
|
|
176
|
+
declare function ipFromDecimal(decimal: number): string;
|
|
177
|
+
interface SubnetInfo {
|
|
178
|
+
networkAddress: string;
|
|
179
|
+
broadcastAddress: string;
|
|
180
|
+
subnetMask: string;
|
|
181
|
+
wildcardMask: string;
|
|
182
|
+
firstHost: string;
|
|
183
|
+
lastHost: string;
|
|
184
|
+
totalHosts: number;
|
|
185
|
+
usableHosts: number;
|
|
186
|
+
prefix: number;
|
|
187
|
+
ipClass: "A" | "B" | "C" | "D" | "E" | "unknown";
|
|
188
|
+
isPrivate: boolean;
|
|
189
|
+
}
|
|
190
|
+
declare function isValidIp(ip: string): boolean;
|
|
191
|
+
declare function isValidCidr(cidr: string): boolean;
|
|
192
|
+
declare function ipToDecimalCidr(ip: string): number | {
|
|
193
|
+
error: string;
|
|
194
|
+
};
|
|
195
|
+
declare function decimalToIpCidr(decimal: number): string;
|
|
196
|
+
declare function calcSubnet(cidr: string): SubnetInfo | {
|
|
197
|
+
error: string;
|
|
198
|
+
};
|
|
199
|
+
declare function splitSubnet(cidr: string, newPrefix: number): SubnetInfo[] | {
|
|
200
|
+
error: string;
|
|
201
|
+
};
|
|
202
|
+
interface SemverVersion {
|
|
203
|
+
major: number;
|
|
204
|
+
minor: number;
|
|
205
|
+
patch: number;
|
|
206
|
+
prerelease?: string;
|
|
207
|
+
build?: string;
|
|
208
|
+
raw: string;
|
|
209
|
+
}
|
|
210
|
+
declare function parseSemver(version: string): SemverVersion | {
|
|
211
|
+
error: string;
|
|
212
|
+
};
|
|
213
|
+
declare function isValid(version: string): boolean;
|
|
214
|
+
declare function compareSemver(a: string, b: string): -1 | 0 | 1 | {
|
|
215
|
+
error: string;
|
|
216
|
+
};
|
|
217
|
+
declare function satisfiesRange(version: string, range: string): boolean | {
|
|
218
|
+
error: string;
|
|
219
|
+
};
|
|
220
|
+
declare function bumpVersion(version: string, bump: "major" | "minor" | "patch"): string | {
|
|
221
|
+
error: string;
|
|
222
|
+
};
|
|
223
|
+
declare function sortVersions(versions: string[], order?: "asc" | "desc"): string[];
|
|
224
|
+
|
|
225
|
+
type units_AspectRatioResult = AspectRatioResult;
|
|
226
|
+
declare const units_BASE_LABELS: typeof BASE_LABELS;
|
|
227
|
+
declare const units_BASE_PREFIXES: typeof BASE_PREFIXES;
|
|
228
|
+
declare const units_BYTE_UNITS: typeof BYTE_UNITS;
|
|
229
|
+
type units_BaseConvertResult = BaseConvertResult;
|
|
230
|
+
type units_ByteConvertResult = ByteConvertResult;
|
|
231
|
+
type units_ByteUnit = ByteUnit;
|
|
232
|
+
declare const units_COMMON_CURRENCIES: typeof COMMON_CURRENCIES;
|
|
233
|
+
declare const units_COMMON_LOCALES: typeof COMMON_LOCALES;
|
|
234
|
+
declare const units_COMMON_PERMISSIONS: typeof COMMON_PERMISSIONS;
|
|
235
|
+
declare const units_COMMON_RATIOS: typeof COMMON_RATIOS;
|
|
236
|
+
declare const units_COMMON_SIZES: typeof COMMON_SIZES;
|
|
237
|
+
declare const units_COMMON_VIEWPORTS: typeof COMMON_VIEWPORTS;
|
|
238
|
+
type units_Dimensions = Dimensions;
|
|
239
|
+
type units_FilePermissions = FilePermissions;
|
|
240
|
+
type units_FormatOptions = FormatOptions;
|
|
241
|
+
type units_IpConversion = IpConversion;
|
|
242
|
+
type units_NotationStyle = NotationStyle;
|
|
243
|
+
type units_NumberBase = NumberBase;
|
|
244
|
+
type units_Permission = Permission;
|
|
245
|
+
type units_PxConvertResult = PxConvertResult;
|
|
246
|
+
type units_SemverVersion = SemverVersion;
|
|
247
|
+
type units_SubnetInfo = SubnetInfo;
|
|
248
|
+
type units_ViewportConvertResult = ViewportConvertResult;
|
|
249
|
+
declare const units_autoFormat: typeof autoFormat;
|
|
250
|
+
declare const units_bumpVersion: typeof bumpVersion;
|
|
251
|
+
declare const units_calcAspectRatio: typeof calcAspectRatio;
|
|
252
|
+
declare const units_calcSubnet: typeof calcSubnet;
|
|
253
|
+
declare const units_compareSemver: typeof compareSemver;
|
|
254
|
+
declare const units_convert: typeof convert;
|
|
255
|
+
declare const units_convertBytes: typeof convertBytes;
|
|
256
|
+
declare const units_convertIp: typeof convertIp;
|
|
257
|
+
declare const units_coverBox: typeof coverBox;
|
|
258
|
+
declare const units_decimalToIp: typeof decimalToIp;
|
|
259
|
+
declare const units_decimalToIpCidr: typeof decimalToIpCidr;
|
|
260
|
+
declare const units_describePermissions: typeof describePermissions;
|
|
261
|
+
declare const units_fitIntoBox: typeof fitIntoBox;
|
|
262
|
+
declare const units_formatNumber: typeof formatNumber;
|
|
263
|
+
declare const units_formatValue: typeof formatValue;
|
|
264
|
+
declare const units_formatVwValue: typeof formatVwValue;
|
|
265
|
+
declare const units_formatWithSeparator: typeof formatWithSeparator;
|
|
266
|
+
declare const units_gcd: typeof gcd;
|
|
267
|
+
declare const units_ipFromBinary: typeof ipFromBinary;
|
|
268
|
+
declare const units_ipFromDecimal: typeof ipFromDecimal;
|
|
269
|
+
declare const units_ipFromHex: typeof ipFromHex;
|
|
270
|
+
declare const units_ipToBinary: typeof ipToBinary;
|
|
271
|
+
declare const units_ipToDecimal: typeof ipToDecimal;
|
|
272
|
+
declare const units_ipToDecimalCidr: typeof ipToDecimalCidr;
|
|
273
|
+
declare const units_ipToHex: typeof ipToHex;
|
|
274
|
+
declare const units_ipToOctal: typeof ipToOctal;
|
|
275
|
+
declare const units_isValid: typeof isValid;
|
|
276
|
+
declare const units_isValidCidr: typeof isValidCidr;
|
|
277
|
+
declare const units_isValidIp: typeof isValidIp;
|
|
278
|
+
declare const units_isValidIpv4: typeof isValidIpv4;
|
|
279
|
+
declare const units_octalToPermissions: typeof octalToPermissions;
|
|
280
|
+
declare const units_parseFileSize: typeof parseFileSize;
|
|
281
|
+
declare const units_parseInput: typeof parseInput;
|
|
282
|
+
declare const units_parseNumberString: typeof parseNumberString;
|
|
283
|
+
declare const units_parseSemver: typeof parseSemver;
|
|
284
|
+
declare const units_permissionsToChmod: typeof permissionsToChmod;
|
|
285
|
+
declare const units_permissionsToOctal: typeof permissionsToOctal;
|
|
286
|
+
declare const units_permissionsToSymbolic: typeof permissionsToSymbolic;
|
|
287
|
+
declare const units_ptToPx: typeof ptToPx;
|
|
288
|
+
declare const units_pxToAll: typeof pxToAll;
|
|
289
|
+
declare const units_pxToViewport: typeof pxToViewport;
|
|
290
|
+
declare const units_remToPx: typeof remToPx;
|
|
291
|
+
declare const units_satisfiesRange: typeof satisfiesRange;
|
|
292
|
+
declare const units_scaleByHeight: typeof scaleByHeight;
|
|
293
|
+
declare const units_scaleByWidth: typeof scaleByWidth;
|
|
294
|
+
declare const units_sortVersions: typeof sortVersions;
|
|
295
|
+
declare const units_splitSubnet: typeof splitSubnet;
|
|
296
|
+
declare const units_symbolicToPermissions: typeof symbolicToPermissions;
|
|
297
|
+
declare const units_viewportToPx: typeof viewportToPx;
|
|
298
|
+
declare namespace units {
|
|
299
|
+
export { type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BaseConvertResult as BaseConvertResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_Dimensions as Dimensions, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IpConversion as IpConversion, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_SemverVersion as SemverVersion, type units_SubnetInfo as SubnetInfo, type units_ViewportConvertResult as ViewportConvertResult, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_compareSemver as compareSemver, units_convert as convert, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_viewportToPx as viewportToPx };
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export { isValidIp as $, type AspectRatioResult as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type Dimensions as D, describePermissions as E, type FilePermissions as F, fitIntoBox as G, formatNumber as H, type IpConversion as I, formatValue as J, formatVwValue as K, formatWithSeparator as L, gcd as M, type NotationStyle as N, ipFromBinary as O, type Permission as P, ipFromDecimal as Q, ipFromHex as R, type SemverVersion as S, ipToBinary as T, ipToDecimal as U, type ViewportConvertResult as V, ipToDecimalCidr as W, ipToHex as X, ipToOctal as Y, isValid as Z, isValidCidr as _, BASE_PREFIXES as a, isValidIpv4 as a0, octalToPermissions as a1, parseFileSize as a2, parseInput as a3, parseNumberString as a4, parseSemver as a5, permissionsToChmod as a6, permissionsToOctal as a7, permissionsToSymbolic as a8, ptToPx as a9, pxToAll as aa, pxToViewport as ab, remToPx as ac, satisfiesRange as ad, scaleByHeight as ae, scaleByWidth as af, sortVersions as ag, splitSubnet as ah, symbolicToPermissions as ai, viewportToPx as aj, BYTE_UNITS as b, type BaseConvertResult as c, type ByteConvertResult as d, type ByteUnit as e, COMMON_LOCALES as f, COMMON_PERMISSIONS as g, COMMON_RATIOS as h, COMMON_SIZES as i, COMMON_VIEWPORTS as j, type FormatOptions as k, type NumberBase as l, type PxConvertResult as m, type SubnetInfo as n, autoFormat as o, bumpVersion as p, calcAspectRatio as q, calcSubnet as r, compareSemver as s, convert as t, units as u, convertBytes as v, convertIp as w, coverBox as x, decimalToIp as y, decimalToIpCidr as z };
|