main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
273 bytes
|
Line | |
---|
1 | (function () {
|
---|
2 | "use strict";
|
---|
3 |
|
---|
4 | function btoa(str) {
|
---|
5 | var buffer;
|
---|
6 |
|
---|
7 | if (str instanceof Buffer) {
|
---|
8 | buffer = str;
|
---|
9 | } else {
|
---|
10 | buffer = Buffer.from(str.toString(), 'binary');
|
---|
11 | }
|
---|
12 |
|
---|
13 | return buffer.toString('base64');
|
---|
14 | }
|
---|
15 |
|
---|
16 | module.exports = btoa;
|
---|
17 | }());
|
---|
Note:
See
TracBrowser
for help on using the repository browser.