【文件属性】:
文件名称:introspect-fun:JavaScript函数自省以检索函数的参数名称
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-20 09:22:16
JavaScript
内省的乐趣
能够对函数进行自省的节点模块,可以在数组中返回其参数名称。
安装
npm install --save introspect-fun
原料药
基本用途
var introspect = require ( 'introspect-fun' ) ;
var noArgs = function ( ) { } ;
var withArgs = function ( arg1 , arg2 , hello ) { } ;
function withArgsBis ( arg1 , arg2 , arg3 ) { } ;
function withNestedFunc ( notNestedArg ) {
function myNested ( nestedArg ) { }
} ;
var res1 = introspect ( noArgs ) ;
// res1 = [
【文件预览】:
introspect-fun-master
----.gitignore(526B)
----.eslintrc(111B)
----package.json(929B)
----LICENSE(1KB)
----index.js(53B)
----README.md(2KB)
----.istanbul.yml(117B)
----lib()
--------introspect-fun.js(465B)
----test()
--------.eslintrc(134B)
--------introspect_test.js(4KB)