Have ideas to improve npm?Join in the discussion! »

    base64-url
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/base64-url package

    2.3.3 • Public • Published

    base64-url

    Base64 encode, decode, escape and unescape for URL applications.

    Build StatusCoverage StatusISC LicenseNodeJS

    JavaScript Style Guide

    API

    const base64url = require('base64-url')

    examples

     
    base64url.encode('Node.js is awesome.')
    // returns Tm9kZS5qcyBpcyBhd2Vzb21lLg
     
    base64url.decode('Tm9kZS5qcyBpcyBhd2Vzb21lLg')
    // returns Node.js is awesome.
     
    base64url.escape('This+is/goingto+escape==')
    // returns This-is_goingto-escape
     
    base64url.unescape('This-is_goingto-escape')
    // returns This+is/goingto+escape==
     
    //
    // setting a different encoding 
    //
     
    base64url.encode(string to encode, encoding)
    base64url.decode(string to decode, encoding)
     

    ISC License (ISC)

    Alternatives

    Install

    npm i base64-url

    DownloadsWeekly Downloads

    339,224

    Version

    2.3.3

    License

    ISC

    Unpacked Size

    3.96 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar