-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
invalidIssues and PRs that are invalid.Issues and PRs that are invalid.
Description
- Version: v10.13.0
- Platform: Linux dcloud_dev 3.13.0-88-generic io.js (IO.js? iojs?) and node.js documentation fragmentation #135-Ubuntu SMP Wed Jun 8 21:10:42 UTC 2016 x86_64 GNU/Linux
- Subsystem:
I use the conversion to the hexadecimal number buffer as follows
Buffer.from(number.toString(16), 'hex')
But, for number less that 16(15, 14 and so on) I get an empty buffer.
Example
const buf = Buffer.from((5).toString(16), 'hex');
console.log(buf); // <Buffer >
krzkaczor, alxhotel, Wangmmx, a1300 and Parsonswy
Metadata
Metadata
Assignees
Labels
invalidIssues and PRs that are invalid.Issues and PRs that are invalid.