atob-lite provides a streamlined, isomorphic solution for Base64 decoding in JavaScript, abstracting away the platform-specific `atob` implementations. It intelligently uses the native `atob` function in browser environments and Node.js's `Buffer` API for server-side operations. The package's core strength lies in its build-time optimization: it leverages the `main` and `browser` fields in `package.json` to prevent build tools like Browserify from unnecessarily bundling the heavier `Buffer` shim into browser-destined code. This ensures a minimal footprint for client-side applications. The current stable version is 2.0.0. Given its nature as a foundational utility, its release cadence is generally slow, focusing on stability, cross-environment compatibility, and critical bug fixes rather than frequent feature additions. Its primary differentiator is its "lite" approach to isomorphic Base64 decoding, specifically designed to avoid common bundle size issues associated with `Buffer` shims in browser builds.
npm install atob-liteVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to decode a Base64 string using `atob-lite` and conceptually illustrates its environment-agnostic behavior, utilizing native browser `atob` or Node.js `Buffer` as appropriate.
Use established cryptographic methods (e.g., AES, RSA) for data security and integrity when handling sensitive information.
Ensure you are using the correct package for the intended operation: `atob-lite` for decoding, `btoa-lite` for encoding.
Rely on `atob-lite` for Base64 decoding in isomorphic code. Avoid direct `Buffer` usage in shared code that targets browsers unless a large bundle size is acceptable or necessary.
For CommonJS, use `const atob = require('atob-lite')`. For ES Modules, use `import atob from 'atob-lite'`.Use `const atob = require('atob-lite')` for CommonJS or `import atob from 'atob-lite'` for ES Modules to correctly import the default function.Change the import statement to `import atob from 'atob-lite'`.
No dependency data recorded yet.