The JavaScript Database, for Node.js, nw.js, electron and the browser
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.
 
 
nedb/docs/customUtilsBrowser.md

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 &amp; React-Native</p>
* [customUtilsBrowser](#module_customUtilsBrowser)
* [~randomBytes(size)](#module_customUtilsBrowser..randomBytes) ⇒ <code>array.&lt;number&gt;</code>
* [~byteArrayToBase64(uint8)](#module_customUtilsBrowser..byteArrayToBase64) ⇒ <code>string</code>
<a name="module_customUtilsBrowser..randomBytes"></a>
### customUtilsBrowser~randomBytes(size) ⇒ <code>array.&lt;number&gt;</code>
<p>Taken from the crypto-browserify module
https://github.com/dominictarr/crypto-browserify
NOTE: Math.random() does not guarantee &quot;cryptographic quality&quot; 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>