mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Add definitions and tests for NodeJs package bytes v2.1.0
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/// <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));
|
||||
Reference in New Issue
Block a user