has-private-fields:确定JS环境是否具有私有字段(“ class {#x;}”)支持

时间:2021-05-12 12:47:03
【文件属性】:
文件名称:has-private-fields:确定JS环境是否具有私有字段(“ class {#x;}”)支持
文件大小:12KB
文件格式:ZIP
更新时间:2021-05-12 12:47:03
javascript ecmascript class private fields 有私人领域 确定JS环境是否具有私有字段( class { #x; } )支持。 例子 const assert = require ( 'assert' ) ; const hasPrivateFields = require ( 'has-private-fields' ) ; assert . equal ( hasPrivateFields ( ) , true ) ; // if the environment has native class private fields support (node v12+) const { hasPrivateAccessors , hasPrivateMethods } = hasPrivateFields ; assert . equal ( hasPrivateAccessors ( ) , true ) ; // if the e
【文件预览】:
has-private-fields-main
----.eslintrc(106B)
----.github()
--------FUNDING.yml(564B)
--------workflows()
----.npmignore(2KB)
----LICENSE(1KB)
----test()
--------index.js(796B)
----README.md(2KB)
----.npmrc(55B)
----.gitignore(2KB)
----index.js(617B)
----CHANGELOG.md(2KB)
----.eslintignore(10B)
----package.json(2KB)
----.nycrc(139B)

网友评论