mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
16 lines
408 B
TypeScript
16 lines
408 B
TypeScript
/// <reference path="./bytes.d.ts"/>
|
|
|
|
import bytes = require('bytes');
|
|
|
|
// 1024*1024 = 1048576
|
|
console.log(bytes(104857));
|
|
console.log(bytes(104857, { thousandsSeparator: ' ' }));
|
|
|
|
console.log(bytes.format(104857));
|
|
console.log(bytes.format(104857, { thousandsSeparator: ' ' }));
|
|
|
|
console.log(bytes('1024kb'));
|
|
console.log(bytes(1024));
|
|
|
|
console.log(bytes.parse('1024kb'));
|
|
console.log(bytes.parse(1024)); |