MCPcopy Create free account
hub / github.com/AlexErrant/Pentive / unique

Function unique

shared-dom/src/language/query2sql.ts:151–155  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

149
150// https://stackoverflow.com/a/28798479
151export function unique(str: string) {
152 return Array.from(str)
153 .filter((item, i, ar) => ar.indexOf(item) === i)
154 .join('')
155}
156
157export function getLabel(node: SyntaxNodeRef) {
158 if (node.type.is(qt.Group) || node.type.isTop) return undefined

Callers 2

regexCtorFunction · 0.90
astEnterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected