MCPcopy Create free account
hub / github.com/bigcode-project/jupytercoder / judgeIsTheLastLine

Function judgeIsTheLastLine

src/utility.js:204–227  ·  view source on GitHub ↗
(context, currrntIndex)

Source from the content-addressed store, hash-verified

202
203
204const judgeIsTheLastLine = (context, currrntIndex) => {
205 if (currrntIndex == context.length - 1) {
206 return true
207 }
208
209 currrntIndex++
210
211 for (currrntIndex; currrntIndex < context.length; currrntIndex++) {
212
213 const lineInformation = context[currrntIndex]
214
215 if (lineInformation.type == "output"){
216 return true
217 }
218
219 // replace '$ZeroWidthSpace;'
220 if (lineInformation.content.replace("​", '').length != 0) {
221 return false
222 }
223
224 }
225
226 return true
227}
228
229
230

Calls

no outgoing calls

Tested by

no test coverage detected