use of elemental2.core.JsRegExp in project vue-gwt by Axellience.
the class VueDirectiveOptions method getFunctionBody.
private String getFunctionBody(Function jsFunction) {
JsString jsString = cast(jsFunction.toString());
// Get content between first { and last }
JsString m = cast(jsString.match(new JsRegExp("\\{([\\s\\S]*)\\}", "m"))[1]);
// Strip comments
return m.replace(new JsRegExp("^\\s*\\/\\/.*$", "mg"), "").trim();
}