Rocky_Mountain_Vending/.pnpm-store/v10/files/b5/31e3a280396562c29447418d18919e63482fbc2045539acfab1838440228ed2d6d9e1ddd2ea805c6dd47e61a686558631f71f46132da24cf157810a78efcc8
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

34 lines
No EOL
1.3 KiB
Text

/*
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Check if the given string is a single complex grapheme. A complex grapheme is one that
* is made up of multiple characters.
*/
export function isSingleComplexGrapheme(value) {
return isSingleGrapheme(value) && value.length > 1;
}
/**
* Check if the given string is a single grapheme.
*/
export function isSingleGrapheme(value) {
// Theoretically there can be some strings considered a grapheme in some locales, like
// slovak "ch" digraph. Use english locale for consistency.
// https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries
const segmenter = new Intl.Segmenter('en', { granularity: 'grapheme' });
return [...segmenter.segment(value)].length === 1;
}
//# sourceMappingURL=graphemeTools.js.map