Skip to content

crsayen/hada

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hada

helpers for converting between bytes, strings, numbers, and more

import * as hada from 'hada'

hada.bytesToInt([255, 255]) // 65535

hada.intToBytes(65535) // [255, 255]

hada.hexToBytes('ffff') // [255, 255]

hada.bytesToHex([255, 255]) // 'ffff'

hada.stringToAsciiHex('hello world') // '68656c6c6f20776f726c64'

hada.asciiHexToString('68656c6c6f20776f726c64') // 'hello world'

hada.stringToAsciiBytes('hello world')
//[104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]
                                         
hada.asciiBytesToString([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100])
// 'hello world'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors