MCPcopy Create free account
hub / github.com/HubSpot/draft-convert / nullthrows

Function nullthrows

src/convertFromHTML.js:90–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88};
89
90const nullthrows = x => {
91 if (x != null) {
92 return x;
93 }
94 throw new Error('Got unexpected null or undefined');
95};
96
97const sanitizeDraftText = input => {
98 return input.replace(REGEX_BLOCK_DELIMITER, '');

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…