Skip to content

Commit 104e6ea

Browse files
authored
Merge pull request #7 from jcalfee/patch-1
What if secure-random is not supported? Close #2
2 parents f6ab585 + 4cfc008 commit 104e6ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ var secureRandom = require('secure-random')
106106
var data = secureRandom.randomBuffer(10)
107107
```
108108

109+
Handling Errors
110+
-----
111+
112+
An error will be thrown if a secure random number generator is not available.
113+
114+
```javascript
115+
throw new Error("Your browser does not support window.crypto.")
116+
```
109117

110118
References
111119
----------

0 commit comments

Comments
 (0)