expo-beacon 0.5.2 → 0.5.3

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.
@@ -242,11 +242,10 @@ public class ExpoBeaconModule: Module {
242
242
  // MARK: - Eddystone Pair
243
243
 
244
244
  Function("pairEddystone") { (identifier: String, namespace: String, instance: String) -> Void in
245
- let hexPattern = /^[0-9a-fA-F]+$/
246
- guard namespace.count == 20, namespace.wholeMatch(of: hexPattern) != nil else {
245
+ guard namespace.count == 20, namespace.range(of: "^[0-9a-fA-F]+$", options: .regularExpression) != nil else {
247
246
  throw Exception(name: "INVALID_NAMESPACE", description: "Namespace must be 20 hex characters, got: \(namespace)")
248
247
  }
249
- guard instance.count == 12, instance.wholeMatch(of: hexPattern) != nil else {
248
+ guard instance.count == 12, instance.range(of: "^[0-9a-fA-F]+$", options: .regularExpression) != nil else {
250
249
  throw Exception(name: "INVALID_INSTANCE", description: "Instance must be 12 hex characters, got: \(instance)")
251
250
  }
252
251
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-beacon",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Expo module for scanning, pairing, and monitoring iBeacons on Android and iOS",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",