MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / assertPostContentWithinLimit

Function assertPostContentWithinLimit

src/Data/PostData.js:16–21  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

14}
15
16function assertPostContentWithinLimit(content) {
17 const size = getUtf8ByteLength(content);
18 if (size > POST_CONTENT_MAX_BYTES) {
19 throw new Error(`Post content cannot exceed ${formatPostContentSize(POST_CONTENT_MAX_BYTES)}.`);
20 }
21}
22
23function normalizeTags(tags) {
24 if (Array.isArray(tags)) {

Callers 2

addModifyPostFunction · 0.85
addCommentFunction · 0.85

Calls 2

getUtf8ByteLengthFunction · 0.85
formatPostContentSizeFunction · 0.85

Tested by

no test coverage detected