1
- # lib-boilerplate
1
+ # ab64
2
2
3
- [ ![ GitHub Actions] ( https://github.com/un-ts/lib-boilerplate /workflows/CI/badge.svg )] ( https://github.com/un-ts/lib-boilerplate /actions/workflows/ci.yml )
4
- [ ![ Codecov] ( https://img.shields.io/codecov/c/github/un-ts/lib-boilerplate .svg )] ( https://codecov.io/gh/un-ts/lib-boilerplate )
5
- [ ![ Language grade: JavaScript] ( https://img.shields.io/lgtm/grade/javascript/g/un-ts/lib-boilerplate .svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/un-ts/lib-boilerplate /context:javascript )
6
- [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun-ts%2Flib-boilerplate %2Fmain%2Fpackage.json )] ( https://github.com/plantain-00/type-coverage )
7
- [ ![ npm] ( https://img.shields.io/npm/v/lib-boilerplate .svg )] ( https://www.npmjs.com/package/lib-boilerplate )
8
- [ ![ GitHub Release] ( https://img.shields.io/github/release/un-ts/lib-boilerplate )] ( https://github.com/un-ts/lib-boilerplate /releases )
3
+ [ ![ GitHub Actions] ( https://github.com/un-ts/ab64 /workflows/CI/badge.svg )] ( https://github.com/un-ts/ab64 /actions/workflows/ci.yml )
4
+ [ ![ Codecov] ( https://img.shields.io/codecov/c/github/un-ts/ab64 .svg )] ( https://codecov.io/gh/un-ts/ab64 )
5
+ [ ![ Language grade: JavaScript] ( https://img.shields.io/lgtm/grade/javascript/g/un-ts/ab64 .svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/un-ts/ab64 /context:javascript )
6
+ [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun-ts%2Fab64 %2Fmain%2Fpackage.json )] ( https://github.com/plantain-00/type-coverage )
7
+ [ ![ npm] ( https://img.shields.io/npm/v/ab64 .svg )] ( https://www.npmjs.com/package/ab64 )
8
+ [ ![ GitHub Release] ( https://img.shields.io/github/release/un-ts/ab64 )] ( https://github.com/un-ts/ab64 /releases )
9
9
10
10
[ ![ Conventional Commits] ( https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg )] ( https://conventionalcommits.org )
11
11
[ ![ Renovate enabled] ( https://img.shields.io/badge/renovate-enabled-brightgreen.svg )] ( https://renovatebot.com )
12
12
[ ![ JavaScript Style Guide] ( https://img.shields.io/badge/code_style-standard-brightgreen.svg )] ( https://standardjs.com )
13
13
[ ![ Code Style: Prettier] ( https://img.shields.io/badge/code_style-prettier-ff69b4.svg )] ( https://github.com/prettier/prettier )
14
14
[ ![ changesets] ( https://img.shields.io/badge/maintained%20with-changesets-176de3.svg )] ( https://github.com/changesets/changesets )
15
15
16
- A simple library boilerplate.
16
+ The smallest and fastest Base64 implementation in JavaScript
17
17
18
18
## TOC <!-- omit in toc -->
19
19
@@ -31,21 +31,35 @@ A simple library boilerplate.
31
31
32
32
``` sh
33
33
# pnpm
34
- pnpm add lib-boilerplate
34
+ pnpm add ab64
35
35
36
36
# yarn
37
- yarn add lib-boilerplate
37
+ yarn add ab64
38
38
39
39
# npm
40
- npm i lib-boilerplate
40
+ npm i ab64
41
41
```
42
42
43
43
### API
44
44
45
45
``` js
46
- import echo from ' lib-boilerplate '
46
+ import { decode , decodeUrl , encode , encodeUrl } from ' ab64 '
47
47
48
- echo ()
48
+ encode (' Hello World!' ) // SGVsbG8gV29ybGQh
49
+
50
+ encode (' dankogai' ) // ZGFua29nYWk=
51
+ encodeUrl (' dankogai' ) // ZGFua29nYWk
52
+
53
+ encode (' 小飼弾' ) // 5bCP6aO85by+
54
+ encodeUrl (' 小飼弾' ) // 5bCP6aO85by-
55
+
56
+ decode (' SGVsbG8gV29ybGQh' ) // Hello World!
57
+
58
+ decode (' ZGFua29nYWk=' ) // dankogai
59
+ decodeUrl (' ZGFua29nYWk' ) // dankogai
60
+
61
+ decode (' 5bCP6aO85by+' ) // 小飼弾
62
+ decodeUrl (' 5bCP6aO85by-' ) // 小飼弾
49
63
```
50
64
51
65
## Sponsors
0 commit comments