Skip to content

📠 Base64 encoder/decoder for JavaScript

License

Notifications You must be signed in to change notification settings

codec-bytes/base64

Repository files navigation

Base64 encoder/decoder for JavaScript. See docs. Parent is @codec-bytes/about.

import*asasciifrom'@codec-bytes/ascii';import*asbase64from'@codec-bytes/base64';letbytes=ascii.encode('any carnal pleasure');base64.decode(bytes);// 'YW55IGNhcm5hbCBwbGVhc3VyZQ=='base64.decode(bytes,{variant: 'RFC7515'});// 'YW55IGNhcm5hbCBwbGVhc3VyZQ'base64.decode(bytes,{variant: 'Y64'});// 'YW55IGNhcm5hbCBwbGVhc3VyZQ--'base64.decode(bytes,{alphabet: 'BCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/A',padding: '.'});// 'ZX66JHOidn6icDCxcHWid4WzaR..'

LicenseVersionTestsDependenciesGitHub issuesDownloads

Code issuesCode maintainabilityCode coverage (cov)Code technical debtDocumentationPackage size

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •