MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / interpret

Function interpret

static/js/codemirror/codemirror.js:2888–2890  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

2886
2887 setSize: function(width, height) {
2888 function interpret(val) {
2889 return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val;
2890 }
2891 if (width != null) this.display.wrapper.style.width = interpret(width);
2892 if (height != null) this.display.wrapper.style.height = interpret(height);
2893 this.refresh();

Callers 1

codemirror.jsFile · 0.85

Calls 1

testMethod · 0.45

Tested by

no test coverage detected