@bfly/utils
Advanced tools
Comparing version 4.15.0 to 4.16.0
@@ -12,7 +12,12 @@ "use strict"; | ||
exports.isUuid = isUuid; | ||
// https://github.com/uuidjs/uuid/blob/0f6c4365275e1f7ef9ee875e01415cd466ae977a/LICENSE.md | ||
const UUID_REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; | ||
var _uuid = require("uuid"); | ||
function validate(uuid) { | ||
return typeof uuid === 'string' && UUID_REGEX.test(uuid); | ||
} // ------ | ||
function isUuid(str) { | ||
return (0, _uuid.validate)(str); | ||
return validate(str); | ||
} | ||
@@ -19,0 +24,0 @@ /** |
@@ -1,4 +0,11 @@ | ||
import { validate as uuidValidate } from 'uuid'; | ||
// https://github.com/uuidjs/uuid/blob/0f6c4365275e1f7ef9ee875e01415cd466ae977a/LICENSE.md | ||
const UUID_REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; | ||
function validate(uuid) { | ||
return typeof uuid === 'string' && UUID_REGEX.test(uuid); | ||
} // ------ | ||
export function isUuid(str) { | ||
return uuidValidate(str); | ||
return validate(str); | ||
} | ||
@@ -5,0 +12,0 @@ /** |
{ | ||
"name": "@bfly/utils", | ||
"version": "4.15.0", | ||
"version": "4.16.0", | ||
"license": "UNLICENSED", | ||
@@ -16,9 +16,7 @@ "author": "Butterfly Network", | ||
"@formatjs/intl": "^2.2.1", | ||
"@sentry/minimal": "^6.13.3", | ||
"@sentry/minimal": "^6.19.7", | ||
"@types/relay-runtime": "^12.0.0", | ||
"@types/segment-analytics": "^0.0.34", | ||
"@types/uuid": "^8.3.4", | ||
"dom-helpers": "^5.2.1", | ||
"utility-types": "^3.10.0", | ||
"uuid": "^8.3.2" | ||
"utility-types": "^3.10.0" | ||
}, | ||
@@ -38,3 +36,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "d023e74240d5645ef2763e12bf314e0cf33bf398" | ||
"gitHead": "ce1ec1cfbcdf7254a01aadb94afa726ee09b759d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66116
8
1133
- Removed@types/uuid@^8.3.4
- Removeduuid@^8.3.2
- Removed@types/uuid@8.3.4(transitive)
- Removeduuid@8.3.2(transitive)
Updated@sentry/minimal@^6.19.7