-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import assertString from "./util/assertString"; | ||
Check failure on line 1 in src/lib/isSHA256.js GitHub Actions / Run tests on Node.js 14
Check failure on line 1 in src/lib/isSHA256.js GitHub Actions / Run tests on Node.js 12
Check failure on line 1 in src/lib/isSHA256.js GitHub Actions / Run tests on Node.js 10
|
||
|
||
const sha256 = /^[a-f0-9]{64}$/; | ||
|
||
export function isSHA256(str) { | ||
Check failure on line 5 in src/lib/isSHA256.js GitHub Actions / Run tests on Node.js 14
Check failure on line 5 in src/lib/isSHA256.js GitHub Actions / Run tests on Node.js 12
Check failure on line 5 in src/lib/isSHA256.js GitHub Actions / Run tests on Node.js 10
|
||
assertString(str); | ||
return sha256.test(str); | ||
} | ||
Check failure on line 8 in src/lib/isSHA256.js GitHub Actions / Run tests on Node.js 14
Check failure on line 8 in src/lib/isSHA256.js GitHub Actions / Run tests on Node.js 12
Check failure on line 8 in src/lib/isSHA256.js GitHub Actions / Run tests on Node.js 10
|