secure-random-octet 1.0.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 Kenan Yildirim <http://kenany.me/>
1
+ Copyright 2014-2022 Kenan Yildirim <https://kenany.me/>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
  this software and associated documentation files (the "Software"), to deal in
@@ -15,4 +15,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
15
  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
16
  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
17
  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # secure-random-octet
2
2
 
3
- [![Build Status](https://img.shields.io/travis/KenanY/secure-random-octet.svg)](https://travis-ci.org/KenanY/secure-random-octet)
4
-
5
3
  Generate a cryptographically secure octet.
6
4
 
7
5
  ## Example
package/index.js CHANGED
@@ -1,7 +1,12 @@
1
- var getRandomValues = require('get-random-values');
1
+ const getRandomValues = require('get-random-values');
2
2
 
3
+ /**
4
+ * Generates a cryptographically secure octet.
5
+ *
6
+ * @returns {number} A cryptographically secure octet
7
+ */
3
8
  function secureRandomOctet() {
4
- var buf = new Uint8Array(1);
9
+ const buf = new Uint8Array(1);
5
10
  getRandomValues(buf);
6
11
  return buf[0];
7
12
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "secure-random-octet",
3
- "version": "1.0.3",
3
+ "version": "3.0.0",
4
4
  "description": "Generate a cryptographically secure octet",
5
5
  "keywords": [
6
6
  "crypto"
7
7
  ],
8
8
  "repository": "KenanY/secure-random-octet",
9
9
  "license": "MIT",
10
- "author": "Kenan Yildirim <kenan@kenany.me> (http://kenany.me/)",
10
+ "author": "Kenan Yildirim <kenan@kenany.me> (https://kenany.me/)",
11
11
  "main": "index.js",
12
12
  "files": [
13
13
  "index.js",
@@ -16,24 +16,31 @@
16
16
  "directories": {
17
17
  "test": "test"
18
18
  },
19
+ "engines": {
20
+ "node": "14 || 16 || >=18"
21
+ },
19
22
  "scripts": {
20
23
  "lint": "eslint *.js test/*.js",
21
24
  "tests-only": "tape test/index.js",
22
25
  "coverage": "nyc npm run -s tests-only",
26
+ "release": "semantic-release",
23
27
  "pretest": "npm run -s lint",
24
28
  "test": "npm run -s tests-only"
25
29
  },
26
30
  "dependencies": {
27
- "get-random-values": "^1.0.0"
31
+ "get-random-values": "^1.2.2"
28
32
  },
29
33
  "devDependencies": {
30
- "@kenan/eslint-config": "6.0.0",
31
- "@kenan/renovate-config": "1.1.1",
32
- "eslint": "5.16.0",
33
- "lodash.every": "4.6.0",
34
- "lodash.isfunction": "3.0.9",
35
- "lodash.isnumber": "3.0.3",
36
- "nyc": "9.0.1",
37
- "tape": "4.10.2"
34
+ "@kenan/eslint-config": "^9.0.4",
35
+ "@semantic-release/changelog": "^6.0.1",
36
+ "@semantic-release/git": "^10.0.1",
37
+ "conventional-changelog-conventionalcommits": "^5.0.0",
38
+ "eslint": "^7.32.0",
39
+ "lodash.every": "^4.6.0",
40
+ "lodash.isfunction": "^3.0.9",
41
+ "lodash.isnumber": "^3.0.3",
42
+ "nyc": "^15.1.0",
43
+ "semantic-release": "^19.0.3",
44
+ "tape": "^5.5.3"
38
45
  }
39
46
  }