* Given a codepoint, return true if it falls within one of the * scripts or script families defined above and false otherwise. * * Micro benchmarks shows that this is faster than * /[\u3000-\u30FF\u4E00-\u9FAF\uFF00-\uFF60\uAC00-\uD7AF\u0900-\u109F]/.test() * in Firefox, Chrome and Node.
(codepoint)
| 561 | */ |
| 562 | |
| 563 | function supportedCodepoint(codepoint) { |
| 564 | for (let i = 0; i < allBlocks.length; i += 2) { |
| 565 | if (codepoint >= allBlocks[i] && codepoint <= allBlocks[i + 1]) { |
| 566 | return true; |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | return false; |
| 571 | } |
| 572 | |
| 573 | /** |
| 574 | * This file provides support to domTree.js |
no outgoing calls
no test coverage detected