Gathering detailed insights and metrics for abab-test
Gathering detailed insights and metrics for abab-test
Gathering detailed insights and metrics for abab-test
Gathering detailed insights and metrics for abab-test
npm install abab-test
Typescript
Module System
Node Version
NPM Version
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
92 Stars
104 Commits
19 Forks
5 Watchers
1 Branches
13 Contributors
Updated on Mar 16, 2025
Latest Version
2.0.3
Package Id
abab-test@2.0.3
Unpacked Size
11.83 kB
Size
5.15 kB
File Count
8
NPM Version
6.14.5
Node Version
14.3.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A JavaScript module that implements window.atob
and window.btoa
according the forgiving-base64 algorithm in the Infra Standard. The original code was forked from w3c/web-platform-tests.
Compatibility: Node.js version 3+ and all major browsers.
Install with npm
:
1npm install abab
btoa
(base64 encode)1const { btoa } = require('abab'); 2btoa('Hello, world!'); // 'SGVsbG8sIHdvcmxkIQ=='
atob
(base64 decode)1const { atob } = require('abab'); 2atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!'
Per the spec, btoa
will accept strings "containing only characters in the range U+0000
to U+00FF
." If passed a string with characters above U+00FF
, btoa
will return null
. If atob
is passed a string that is not base64-valid, it will also return null
. In both cases when null
is returned, the spec calls for throwing a DOMException
of type InvalidCharacterError
.
If you want to include just one of the methods to save bytes in your client-side code, you can require
the desired module directly.
1const atob = require('abab/lib/atob'); 2const btoa = require('abab/lib/btoa');
If you're submitting a PR or deploying to npm, please use the checklists in CONTRIBUTING.md
atob
vs. btoa
Here's a mnemonic that might be useful: if you have a plain string and want to base64 encode it, then decode it, btoa
is what you run before (before - btoa), and atob
is what you run after (after - atob).
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
Found 9/19 approved changesets -- score normalized to 4
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More