Skip to content

data-uri-to-buffer@6.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 30 Sep 14:29
· 25 commits to main since this release
b149ecc

Major Changes

  • 52b458f: Refactor to return an ArrayBuffer instead of a Node.js Buffer.

    This change is being made to make the package platform-agnostic, and work in web browsers or other non-Node.js environments without polyfills.

    For Node.js users of this package, you can get a Node.js Buffer instance from an ArrayBuffer like so:

    const uri = 'data:,Hello%2C%20World!';
    const parsed = dataUriToBuffer(uri);
    const buffer = Buffer.from(parsed.buffer);
    // `buffer` is a Node.js Buffer