repr.js:repr.js - 比默认转换为字符串更有用的对象表示

时间:2021-07-14 05:00:35
【文件属性】:
文件名称:repr.js:repr.js - 比默认转换为字符串更有用的对象表示
文件大小:8KB
文件格式:ZIP
更新时间:2021-07-14 05:00:35
JavaScript repr.js 比 Object.toString() 更具描述性的值表示。 用法 repr(whatever); > repr(null) "" > repr(undefined) "" > repr(3) "3" > repr("abc") ""abc"" > repr([1,2,3]) "[1, 2, 3]" > repr({a:1, b:2}) "{"a":1, "b":2}" > repr(function foo(){}) "" > function Bar(){}; > Bar.prototype.hi = function(){}; > repr(Bar) "" > repr(new Bar()) "" 开发设置 安装 python 依赖项 $ pip in
【文件预览】:
repr.js-master
----dodo.py(2KB)
----bower.json(660B)
----TODO.txt(115B)
----LICENSE(1KB)
----test()
--------test_repr.js(2KB)
--------runner.html(438B)
----repr.js(3KB)
----hint.json(201B)
----README.md(897B)
----CHANGES.txt(151B)
----.gitignore(71B)
----karma.conf.js(2KB)
----package.json(751B)
----py_requirements.txt(14B)

网友评论