Skip to content

Commit 7db042d

Browse files
committed
Merge branch 'dev'
2 parents 33aeb05 + 980e21a commit 7db042d

File tree

11 files changed

+1231
-1192
lines changed

11 files changed

+1231
-1192
lines changed

changelog.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
- Initial Release
3030

3131
## Minor Releases:
32+
### [v1.2.0] - 2019 07 05
33+
#### Added
34+
- Added UUID tests
35+
#### Changed
36+
- Updated Readme
37+
- Refactored tests
38+
#### Removed
39+
- No more Purify-Int dependency
40+
3241
### [v1.1.0] - 2019 06 29
3342
#### Added
34-
- `randomUUID()` Generate RFC 4122 compliant UUIDs
43+
- `randomUUID()` Generate v4-compliant UUIDs
3544

3645
### [v1.0.1] - 2019 06 23
3746
#### Changed

libs/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

3-
const Purify = require('purify-int')
43
const Crypto = require('crypto')
4+
const { cleanInteger } = require('../util/index')
55

66
// DATA IMPORT
77
const latin = require('../data/256Latin.js')
@@ -57,13 +57,13 @@ async function randomLetter(count = 3, source) {
5757

5858
// EXTERNAL
5959
function random(v = 1) {
60-
const pureV = Purify.asInt(v, 1)
60+
const pureV = cleanInteger(v, 1)
6161
return numberFoundation(pureV)
6262
.then(res => (pureV < 0 && res !== 0) ? res * -1 : res)
6363
}
6464
function randomInRange(v1 = -100, v2 = 100) {
65-
v1 = Purify.asInt(v1, 1)
66-
v2 = Purify.asInt(v2, 1)
65+
v1 = cleanInteger(v1, 1)
66+
v2 = cleanInteger(v2, 1)
6767
let high, low
6868
if (v1 < v2) {
6969
high = v2

0 commit comments

Comments
 (0)