Emoji_Modifier_Base.js (2879B)
1 // Copyright 2025 Mathias Bynens. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 author: Mathias Bynens 6 description: > 7 Unicode property escapes for `Emoji_Modifier_Base` 8 info: | 9 Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests 10 Unicode v17.0.0 11 esid: sec-static-semantics-unicodematchproperty-p 12 features: [regexp-unicode-property-escapes] 13 includes: [regExpUtils.js] 14 ---*/ 15 16 const matchSymbols = buildString({ 17 loneCodePoints: [ 18 0x00261D, 19 0x0026F9, 20 0x01F385, 21 0x01F3C7, 22 0x01F47C, 23 0x01F48F, 24 0x01F491, 25 0x01F4AA, 26 0x01F57A, 27 0x01F590, 28 0x01F6A3, 29 0x01F6C0, 30 0x01F6CC, 31 0x01F90C, 32 0x01F90F, 33 0x01F926, 34 0x01F977, 35 0x01F9BB 36 ], 37 ranges: [ 38 [0x00270A, 0x00270D], 39 [0x01F3C2, 0x01F3C4], 40 [0x01F3CA, 0x01F3CC], 41 [0x01F442, 0x01F443], 42 [0x01F446, 0x01F450], 43 [0x01F466, 0x01F478], 44 [0x01F481, 0x01F483], 45 [0x01F485, 0x01F487], 46 [0x01F574, 0x01F575], 47 [0x01F595, 0x01F596], 48 [0x01F645, 0x01F647], 49 [0x01F64B, 0x01F64F], 50 [0x01F6B4, 0x01F6B6], 51 [0x01F918, 0x01F91F], 52 [0x01F930, 0x01F939], 53 [0x01F93C, 0x01F93E], 54 [0x01F9B5, 0x01F9B6], 55 [0x01F9B8, 0x01F9B9], 56 [0x01F9CD, 0x01F9CF], 57 [0x01F9D1, 0x01F9DD], 58 [0x01FAC3, 0x01FAC5], 59 [0x01FAF0, 0x01FAF8] 60 ] 61 }); 62 testPropertyEscapes( 63 /^\p{Emoji_Modifier_Base}+$/u, 64 matchSymbols, 65 "\\p{Emoji_Modifier_Base}" 66 ); 67 testPropertyEscapes( 68 /^\p{EBase}+$/u, 69 matchSymbols, 70 "\\p{EBase}" 71 ); 72 73 const nonMatchSymbols = buildString({ 74 loneCodePoints: [ 75 0x01F484, 76 0x01F490, 77 0x01F9B7, 78 0x01F9BA, 79 0x01F9D0 80 ], 81 ranges: [ 82 [0x00DC00, 0x00DFFF], 83 [0x000000, 0x00261C], 84 [0x00261E, 0x0026F8], 85 [0x0026FA, 0x002709], 86 [0x00270E, 0x00DBFF], 87 [0x00E000, 0x01F384], 88 [0x01F386, 0x01F3C1], 89 [0x01F3C5, 0x01F3C6], 90 [0x01F3C8, 0x01F3C9], 91 [0x01F3CD, 0x01F441], 92 [0x01F444, 0x01F445], 93 [0x01F451, 0x01F465], 94 [0x01F479, 0x01F47B], 95 [0x01F47D, 0x01F480], 96 [0x01F488, 0x01F48E], 97 [0x01F492, 0x01F4A9], 98 [0x01F4AB, 0x01F573], 99 [0x01F576, 0x01F579], 100 [0x01F57B, 0x01F58F], 101 [0x01F591, 0x01F594], 102 [0x01F597, 0x01F644], 103 [0x01F648, 0x01F64A], 104 [0x01F650, 0x01F6A2], 105 [0x01F6A4, 0x01F6B3], 106 [0x01F6B7, 0x01F6BF], 107 [0x01F6C1, 0x01F6CB], 108 [0x01F6CD, 0x01F90B], 109 [0x01F90D, 0x01F90E], 110 [0x01F910, 0x01F917], 111 [0x01F920, 0x01F925], 112 [0x01F927, 0x01F92F], 113 [0x01F93A, 0x01F93B], 114 [0x01F93F, 0x01F976], 115 [0x01F978, 0x01F9B4], 116 [0x01F9BC, 0x01F9CC], 117 [0x01F9DE, 0x01FAC2], 118 [0x01FAC6, 0x01FAEF], 119 [0x01FAF9, 0x10FFFF] 120 ] 121 }); 122 testPropertyEscapes( 123 /^\P{Emoji_Modifier_Base}+$/u, 124 nonMatchSymbols, 125 "\\P{Emoji_Modifier_Base}" 126 ); 127 testPropertyEscapes( 128 /^\P{EBase}+$/u, 129 nonMatchSymbols, 130 "\\P{EBase}" 131 ); 132 133 reportCompare(0, 0);