UNPKG

@skybloxsystems/ticket-bot

Version:
9 lines (7 loc) 164 B
'use strict'; module.exports = function(fn) { if (fn.name) { return fn.name; } return (fn.toString().trim().match(/^function\s*([^\s(]+)/) || [])[1]; };