MCPcopy Index your code
hub / github.com/ternjs/tern / updateText

Function updateText

lib/tern.js:96–103  ·  view source on GitHub ↗
(file, text, srv)

Source from the content-addressed store, hash-verified

94 var astral = /[\uD800-\uDBFF]/g;
95
96 function updateText(file, text, srv) {
97 file.text = srv.options.stripCRs ? text.replace(/\r\n/g, "\n") : text;
98 file.hasAstral = astral.test(file.text);
99 infer.withContext(srv.cx, function() {
100 file.ast = parseFile(srv, file);
101 });
102 file.lineOffsets = null;
103 }
104
105 var Server = exports.Server = function(options) {
106 this.cx = null;

Callers 2

ensureFileFunction · 0.85
fetchAllFunction · 0.85

Calls 1

parseFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…