MCPcopy
hub / github.com/paperjs/paper.js / getFunctionMessage

Function getFunctionMessage

test/helpers.js:510–521  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

508// Some other helpers:
509
510var getFunctionMessage = function(func) {
511 var message = func.toString().match(
512 /^\s*function[^\{]*\{([\s\S]*)\}\s*$/)[1]
513 .replace(/ /g, '')
514 .replace(/^\s+|\s+$/g, '');
515 if (/^return /.test(message)) {
516 message = message
517 .replace(/^return /, '')
518 .replace(/;$/, '');
519 }
520 return message;
521};
522
523var compareBoolean = function(actual, expected, message, options) {
524 expected = typeof expected === 'string'

Callers 4

equalsFunction · 0.85
compareBooleanFunction · 0.85
compareSVGFunction · 0.85
testMoveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected