mirror of https://github.com/seald/nedb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.3 KiB
34 lines
1.3 KiB
<a name="module_customUtilsBrowser"></a>
|
|
|
|
## customUtilsBrowser
|
|
<p>Utility functions that need to be reimplemented for each environment.
|
|
This is the version for the browser & React-Native</p>
|
|
|
|
|
|
* [customUtilsBrowser](#module_customUtilsBrowser)
|
|
* [~randomBytes(size)](#module_customUtilsBrowser..randomBytes) ⇒ <code>array.<number></code>
|
|
* [~byteArrayToBase64(uint8)](#module_customUtilsBrowser..byteArrayToBase64) ⇒ <code>string</code>
|
|
|
|
<a name="module_customUtilsBrowser..randomBytes"></a>
|
|
|
|
### customUtilsBrowser~randomBytes(size) ⇒ <code>array.<number></code>
|
|
<p>Taken from the crypto-browserify module
|
|
https://github.com/dominictarr/crypto-browserify
|
|
NOTE: Math.random() does not guarantee "cryptographic quality" but we actually don't need it</p>
|
|
|
|
**Kind**: inner method of [<code>customUtilsBrowser</code>](#module_customUtilsBrowser)
|
|
**Params**
|
|
|
|
- size <code>number</code> - <p>in bytes</p>
|
|
|
|
<a name="module_customUtilsBrowser..byteArrayToBase64"></a>
|
|
|
|
### customUtilsBrowser~byteArrayToBase64(uint8) ⇒ <code>string</code>
|
|
<p>Taken from the base64-js module
|
|
https://github.com/beatgammit/base64-js/</p>
|
|
|
|
**Kind**: inner method of [<code>customUtilsBrowser</code>](#module_customUtilsBrowser)
|
|
**Params**
|
|
|
|
- uint8 <code>array</code>
|
|
|
|
|