💾functionDefinition()
JS ⟩ values ⟩ custom functions ⟩ functionDefinition()
replit:isClass()
(to use it, copy and paste from 📁 module file: typeName())
// ⭐️ content of function definition (string)
function functionDefinition(value) {
// ---------------------------------------------------------------------
// ⭐️ will throw a TypeError if value is not a function:
// ⛔ TypeError:
// Function.prototype.toString requires that 'this' be a Function
// ---------------------------------------------------------------------
return Function.prototype.toString.call(value);
}
💈範例:👉 isClass()
Last updated
Was this helpful?