MCPcopy Create free account
hub / github.com/editablejs/editable / predicate

Function predicate

packages/editor/src/plugin/decorate.ts:56–61  ·  view source on GitHub ↗
(decorate: Decorate | string)

Source from the content-addressed store, hash-verified

54
55// Helper function to determine if a decoration is specified by its key or by its reference
56const predicate = (decorate: Decorate | string) => {
57 const isKey = typeof decorate === 'string'
58 return (d: Decorate) => {
59 return isKey ? d.key === decorate : d === decorate
60 }
61}
62
63// Object to handle adding, removing, and checking the presence of decorations in a given Editor instance
64export const Decorate = {

Callers 2

decorate.tsFile · 0.70
solt.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…