MCPcopy Create free account
hub / github.com/tree-sitter/tree-sitter-javascript / later

Function later

examples/text-editor-component.js:4348–4356  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4346 let timestamp, timeout
4347
4348 function later () {
4349 const last = Date.now() - timestamp
4350 if (last < wait && last >= 0) {
4351 timeout = setTimeout(later, wait - last)
4352 } else {
4353 timeout = null
4354 fn()
4355 }
4356 }
4357
4358 return function () {
4359 timestamp = Date.now()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…