1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.checkName = checkName;
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | function checkName(displayName, name, value) {
|
10 |
|
11 | if (typeof value === "string" && !(new RegExp(/^[\p{L}\p{N}][\p{L}\p{N} ']*[\p{L}\p{N}]$/u)).test(value)) {
|
12 | console.warn("HAP-NodeJS WARNING: The accessory '" + displayName + "' has an invalid '" + name + "' characteristic ('" + value + "'). Please use only " +
|
13 | "alphanumeric, space, and apostrophe characters. Ensure it starts and ends with an alphabetic or numeric character, and avoid emojis. This may prevent " +
|
14 | "the accessory from being added in the Home App or cause unresponsiveness.");
|
15 | }
|
16 | }
|
17 |
|
\ | No newline at end of file |