Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How to convert to buffer in node.js? #34

Closed
@coolaj86

Description

@coolaj86

I need to take a long (from protobufjs) and convert it to base64 using node.js' Buffer... can you add the one-liner to an examples section or something?

I'm just a little confused as to how to do it and, unfortunately, I don't have a reference byte sequence with corresponding base64 string for what I'm working on so trial and error is... confusing... :-/

I was expecting something like

Buffer.from([l.high, l.low]).toString('base64');

but that didn't yield valid values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions