1.0.1 • Published 7 years ago
signage v1.0.1
Signage
Convert your generic "numbers" to signed / unsigned shorts, as done by statically typed languages such as C#.
This module really helps if (like me) you find yourself converting code from said statically typed languages to JavaScript.
For example, signage.short()
will turn:
1
to1
:)32768
to-32768
32769
to-32767
signage.short.unsigned()
will turn:
1
to1
-1
to1
65536
to0
-65536
to0
65537
to1
-65537
to1
Implementation
npm install signage
...
const signage = require('signage');
signage.short(32769); // -32767
Happy coding!