1.0.2 • Published 6 years ago

trekkbyte v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

trekkbyte V1.0 Digital Storage Converter

**Conversions you can do:**

Bits (bit)

  • b - bit
  • kbit > kilobit
  • Mbit > megabit
  • Gbit > gigabit
  • Tbit > terabit
  • Pbit > petabit
  • Ebit > exabit
  • Zbit > zettabit
  • Ybit > yottabit
  • Kibit > kibibit
  • Mibit > mebibit
  • Gibit > gibibit
  • Tibit > tebibit
  • Pibit > pebibit
  • Eibit > exbibit
  • Zibit > zebibit
  • Yibit > yobibit

Bytes (B)

  • B > byte
  • kB > kilobyte
  • MB > megabyte
  • GB > gigabyte
  • TB > terabyte
  • PB > petabyte
  • EB > exabyte
  • ZB > zettabyte
  • YB > yottabyte
  • KiB > kibibyte
  • MiB > mebibyte
  • GiB > gibibyte
  • TiB > tebibyte
  • PiB > pebibyte
  • EiB > exbibyte
  • ZiB > zebibyte
  • YiB > yobibyte

**Usage:**

Console:

λ npm i trekkbyte

JavaScript file:

import {trekkbyte} from trekkbyte
// trekkbyte(value, from, to)
const converted = trekkbyte(2, 'GiB', 'MiB')
console.log(converted)

Console:

λ { value: 2, from: 'gibibyte', to: 'mebibyte', converted: 2048 }

**Examples:**

// converted values
trekkbyte(3.4, "MB", 'Kibit') // { ..., converted: 26562.5 }
trekkbyte(44, "b", 'B') // { ..., converted: 5.5 }
trekkbyte(0.04, "TB", 'GiB') // { ..., converted: 37.25290298461914 }
trekkbyte(28716, "Mibit", 'MiB') // { ..., converted: 3589.5 }

// get all storage values in a object
trekkbyte.trekkbyteList() //  {b: { storage: 0.125, name: 'bit', ... }}

**ML**

010100200300203004004050060000700007008080

**Else:**

  • No dependencies.