Comparing version 10.0.9 to 10.0.10
{ | ||
"name": "filesize", | ||
"description": "JavaScript library to generate a human readable String describing the file size", | ||
"version": "10.0.9", | ||
"version": "10.0.10", | ||
"homepage": "https://filesizejs.com", | ||
@@ -6,0 +6,0 @@ "author": "Jason Mulligan <jason.mulligan@avoidwork.com>", |
@@ -22,18 +22,21 @@ export const ARRAY: "array"; | ||
export const ZERO: "0"; | ||
export const STRINGS: { | ||
symbol: { | ||
iec: { | ||
bits: string[], | ||
bytes: string[] | ||
}, | ||
jedec: { | ||
bits: string[], | ||
bytes: string[], | ||
export namespace STRINGS { | ||
namespace symbol { | ||
namespace iec { | ||
const bits: string[]; | ||
const bytes: string[]; | ||
} | ||
}, | ||
fullform: { | ||
iec: string[], | ||
jedec: string[] | ||
namespace jedec { | ||
const bits_1: string[]; | ||
export { bits_1 as bits }; | ||
const bytes_1: string[]; | ||
export { bytes_1 as bytes }; | ||
} | ||
} | ||
} | ||
namespace fullform { | ||
const iec_1: string[]; | ||
export { iec_1 as iec }; | ||
const jedec_1: string[]; | ||
export { jedec_1 as jedec }; | ||
} | ||
} |
@@ -1,63 +0,32 @@ | ||
interface FileSizeOptionsBase { | ||
base?: number; | ||
export interface FileSizeOptions { | ||
bits?: boolean; | ||
exponent?: number; | ||
fullform?: boolean; | ||
fullforms?: string[]; | ||
locale?: string | boolean; | ||
localeOptions?: Intl.DateTimeFormatOptions; | ||
pad?: boolean; | ||
precision?: number; | ||
base?: number; | ||
round?: number; | ||
roundingMethod?: 'round' | 'floor' | 'ceil'; | ||
locale?: string; | ||
localeOptions?: {}; | ||
separator?: string; | ||
spacer?: string; | ||
symbols?: {}; | ||
standard?: 'iec' | 'jedec'; | ||
symbols?: { | ||
iec: { | ||
bits: string[], | ||
bytes: string[] | ||
}, | ||
jedec: { | ||
bits: string[], | ||
bytes: string[] | ||
} | ||
}; | ||
output?: 'array' | 'exponent' | 'object' | 'string'; | ||
fullform?: boolean; | ||
fullforms?: any[]; | ||
exponent?: number; | ||
roundingMethod?: 'round' | 'floor' | 'ceil'; | ||
precision?: number; | ||
} | ||
interface FileSizeOptionsArray extends FileSizeOptionsBase { | ||
output: 'array' | ||
} | ||
export function filesize(arg: any, { bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision }?: FileSizeOptions): string | number | any[] | { | ||
value: any; | ||
symbol: any; | ||
exponent: number; | ||
unit: string; | ||
}; | ||
interface FileSizeOptionsExponent extends FileSizeOptionsBase { | ||
output: 'exponent' | ||
} | ||
interface FileSizeOptionsObject extends FileSizeOptionsBase { | ||
output: 'object' | ||
} | ||
interface FileSizeOptionsString extends FileSizeOptionsBase { | ||
output: 'string' | ||
} | ||
interface FileSizeReturnObject { | ||
value: string, | ||
symbol: string, | ||
exponent: number, | ||
unit: string, | ||
} | ||
type FileSizeReturnArray = [ number, string ] | ||
export function filesize(byteCount: number, options: FileSizeOptionsString): string | ||
export function filesize(byteCount: number, options: FileSizeOptionsArray): FileSizeReturnArray | ||
export function filesize(byteCount: number, options: FileSizeOptionsExponent): number | ||
export function filesize(byteCount: number, options: FileSizeOptionsObject): FileSizeReturnObject | ||
export function filesize(byteCount: number): string | ||
export function partial(options: FileSizeOptionsString): (byteCount: number) => string | ||
export function partial(options: FileSizeOptionsArray): (byteCount: number) => FileSizeReturnArray | ||
export function partial(options: FileSizeOptionsExponent): (byteCount: number) => number | ||
export function partial(options: FileSizeOptionsObject): (byteCount: number) => FileSizeReturnObject | ||
export function partial(): (byteCount: number) => string | ||
export function partial({ bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision }?: FileSizeOptions): (arg: any) => string | number | any[] | { | ||
value: any; | ||
symbol: any; | ||
exponent: number; | ||
unit: string; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51243
712