UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

2 lines (1 loc) 361 B
import{AtSignMentionsRegex as n,AtSignMentionsRegexAliasRegex as t}from"./constants.js";function e(e,r){const c=n.exec(e)||t.exec(e);if(null!==c){const n=c[1],t=c[3];if(t.length>=r)return{leadOffset:c.index+n.length,matchingString:t,replaceableString:c[2]}}return null}function r(n){return e(n,1)}export{e as checkForAtSignMentions,r as getPossibleQueryMatch};