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

Function cache

examples/jquery.js:855–862  ·  view source on GitHub ↗
( key, value )

Source from the content-addressed store, hash-verified

853 var keys = [];
854
855 function cache( key, value ) {
856 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
857 if ( keys.push( key + " " ) > Expr.cacheLength ) {
858 // Only keep the most recent entries
859 delete cache[ keys.shift() ];
860 }
861 return (cache[ key + " " ] = value);
862 }
863 return cache;
864}
865

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…