MCPcopy
hub / github.com/CodeboxIDE/codebox / expect

Function expect

core/cb.addons/require-tools/less/lessc.js:214–222  ·  view source on GitHub ↗
(arg, msg)

Source from the content-addressed store, hash-verified

212 }
213
214 function expect(arg, msg) {
215 var result = $(arg);
216 if (! result) {
217 error(msg || (typeof(arg) === 'string' ? "expected '" + arg + "' got '" + input.charAt(i) + "'"
218 : "unexpected token"));
219 } else {
220 return result;
221 }
222 }
223
224 function error(msg, type) {
225 var e = new Error(msg);

Callers 1

lessc.jsFile · 0.85

Calls 2

$Function · 0.70
errorFunction · 0.70

Tested by

no test coverage detected