Skip to content

Replacement for newer Node versions #25

@marklagendijk

Description

@marklagendijk

I was using this problem, but then got problems as soon as I started to use a newer version of Node. The following code can replace this module:

module.exports = {
    encode(string){
        return new Buffer(string).toString('base64');
    },
    decode(encodedString){
        return new Buffer(encodedString, 'base64').toString('ascii');
    }
};

Does this work for all versions of Node? If so I think this module should just use the above code.

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