Travis build: 1299
This commit is contained in:
46
README.md
46
README.md
@ -254,6 +254,8 @@ average(1, 2, 3);
|
|||||||
<details>
|
<details>
|
||||||
<summary>View contents</summary>
|
<summary>View contents</summary>
|
||||||
|
|
||||||
|
* [`atob`](#atob)
|
||||||
|
* [`btoa`](#btoa)
|
||||||
* [`colorize`](#colorize)
|
* [`colorize`](#colorize)
|
||||||
* [`hasFlags`](#hasflags)
|
* [`hasFlags`](#hasflags)
|
||||||
* [`hashNode`](#hashnode)
|
* [`hashNode`](#hashnode)
|
||||||
@ -3870,6 +3872,50 @@ toSafeInteger(Infinity); // 9007199254740991
|
|||||||
---
|
---
|
||||||
## 📦 Node
|
## 📦 Node
|
||||||
|
|
||||||
|
### atob
|
||||||
|
|
||||||
|
Decodes a string of data which has been encoded using base-64 encoding.
|
||||||
|
|
||||||
|
Create a `Buffer` for the given string with base-64 encoding and use `Buffer.toString('binary')` to return the decoded string.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const atob = str => new Buffer(str, 'base64').toString('binary');
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Examples</summary>
|
||||||
|
|
||||||
|
```js
|
||||||
|
atob('Zm9vYmFy'); // 'foobar'
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<br>[⬆ Back to top](#table-of-contents)
|
||||||
|
|
||||||
|
|
||||||
|
### btoa
|
||||||
|
|
||||||
|
Creates a base-64 encoded ASCII string from a String object in which each character in the string is treated as a byte of binary data.
|
||||||
|
|
||||||
|
Create a `Buffer` for the given string with binary encoding and use `Buffer.toString('base64')` to return the encoded string.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const btoa = str => new Buffer(str, 'binary').toString('base64');
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Examples</summary>
|
||||||
|
|
||||||
|
```js
|
||||||
|
btoa('foobar'); // 'Zm9vYmFy'
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<br>[⬆ Back to top](#table-of-contents)
|
||||||
|
|
||||||
|
|
||||||
### colorize
|
### colorize
|
||||||
|
|
||||||
Add special characters to text to print in color in the console (combined with `console.log()`).
|
Add special characters to text to print in color in the console (combined with `console.log()`).
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user