MCPcopy Create free account

hub / github.com/dev-mastery/comments-api / functions

Functions47 in github.com/dev-mastery/comments-api

↓ 81 callersFunctionmakeFakeComment
(overrides)
__test__/fixtures/comment.js:17
↓ 10 callersFunctionmakeDb
()
src/data-access/index.js:9
↓ 7 callersFunctionmakeHandleModeration
({ isQuestionable, initiateReview })
src/use-cases/handle-moderation.js:1
↓ 6 callersFunctionmakeCommentsDb
({ makeDb })
src/data-access/comments-db.js:3
↓ 5 callersFunctionmakeAddComment
({ commentsDb, handleModeration })
src/use-cases/add-comment.js:2
↓ 5 callersFunctionmakeEditComment
({ commentsDb, handleModeration })
src/use-cases/edit-comment.js:2
↓ 5 callersFunctionmakeRemoveComment
({ commentsDb })
src/use-cases/remove-comment.js:3
↓ 3 callersFunctionmakePatchComment
({ editComment })
src/controllers/patch-comment.js:1
↓ 3 callersFunctionmakePostComment
({ addComment })
src/controllers/post-comment.js:1
↓ 3 callersFunctionnormalizeModerationApiResponse
(response)
src/is-questionable/is-questionable.js:62
↓ 2 callersFunctionmakeGetComments
({ listComments })
src/controllers/get-comments.js:1
↓ 1 callersFunctionbuildAkismetApiCommand
({ author, browser, createdOn, ip, modifiedOn, querystring, referrer, testOnly, text })
src/is-questionable/is-questionable.js:69
↓ 1 callersFunctionbuildMakeComment
({ Id, md5, sanitize, makeSource })
src/comment/comment.js:1
↓ 1 callersFunctionbuildMakeSource
({ isValidIp })
src/comment/source.js:1
↓ 1 callersFunctionbuildModerationApiCommand
(text)
src/is-questionable/is-questionable.js:49
↓ 1 callersFunctiondeleteCommentAndParent
(comment)
src/use-cases/remove-comment.js:74
↓ 1 callersFunctiondeleteNothing
()
src/use-cases/remove-comment.js:49
↓ 1 callersFunctionhardDelete
(comment)
src/use-cases/remove-comment.js:86
↓ 1 callersFunctionhasReplies
({ id: commentId })
src/use-cases/remove-comment.js:26
↓ 1 callersFunctionisOnlyReplyOfDeletedParent
(comment)
src/use-cases/remove-comment.js:34
↓ 1 callersFunctionisValidIp
(ip)
src/comment/index.js:13
↓ 1 callersFunctionmakeDeleteComment
({ removeComment })
src/controllers/delete-comment.js:1
↓ 1 callersFunctionmakeHash
()
src/comment/comment.js:68
↓ 1 callersFunctionmakeIsQuestionable
({ pipe, issueHttpRequest, querystring })
src/is-questionable/is-questionable.js:1
↓ 1 callersFunctionmakeListComments
({ commentsDb })
src/use-cases/list-comments.js:1
↓ 1 callersFunctionmd5
(text)
src/comment/index.js:17
↓ 1 callersFunctionmd5
(text)
__test__/fixtures/comment.js:10
↓ 1 callersFunctionnest
(comments)
src/use-cases/list-comments.js:14
↓ 1 callersFunctionsanitize
(text)
src/comment/index.js:24
↓ 1 callersFunctionsoftDelete
(commentInfo)
src/use-cases/remove-comment.js:57
FunctionclearDb
()
__test__/fixtures/db.js:22
FunctioncloseDb
()
__test__/fixtures/db.js:17
Methodconstructor
(config)
jest-mongo.js:10
FunctionfindAll
({ publishedOnly = true } = {})
src/data-access/comments-db.js:14
FunctionfindByHash
(comment)
src/data-access/comments-db.js:77
FunctionfindById
({ id: _id })
src/data-access/comments-db.js:23
FunctionfindByPostId
({ postId, omitReplies = true })
src/data-access/comments-db.js:33
FunctionfindReplies
({ commentId, publishedOnly = true })
src/data-access/comments-db.js:45
Functioninsert
({ id: _id = Id.makeId(), ...commentInfo })
src/data-access/comments-db.js:56
FunctionmakeDb
()
__test__/fixtures/db.js:6
FunctionnormalizeAkismetApiResponse
(response)
src/is-questionable/is-questionable.js:102
FunctionnotFound
()
src/controllers/not-found.js:1
Functionremove
({ id: _id })
src/data-access/comments-db.js:72
MethodrunScript
(script)
jest-mongo.js:27
Methodsetup
()
jest-mongo.js:14
Methodteardown
()
jest-mongo.js:23
Functionupdate
({ id: _id, ...commentInfo })
src/data-access/comments-db.js:65