Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 780 Bytes

File metadata and controls

43 lines (32 loc) · 780 Bytes

pFunc.reflect return reflection of a given function, it returns

  • typeName: method or function
  • functionName: function name
  • methodName: method name
  • fileName: filename
  • line: line number
  • column: column number
  • evalOrigin:
  • isTopLevel
  • isEval
  • isNative
  • isConstructor
  • trace: call stack

syntax

pFunc.reflect(function, [limit = 1])

parameters

function: function, function to be analyzed

limit, optional limit, call stack limit

import

with es6 module

import pCommon from 'pico-common'

const pFunc = pCommon.export('pico/func')

with nodejs commonjs

const pFunc = require('pico-common').export('pico/func')

with pico-common amd

const pFunc = require('pico/func')