pyclass:用 JS 编写 Python 样式类

时间:2024-06-21 23:49:19
【文件属性】:

文件名称:pyclass:用 JS 编写 Python 样式类

文件大小:4KB

文件格式:ZIP

更新时间:2024-06-21 23:49:19

JavaScript

PyClass - 在 JS 中编写 Python 类 用JS编写Python风格的类,兼容Nodejs和浏览器。 没有var me/self/_i/SELF/that/_this_/_that_ = this在你的 JS 中了...... 安装 npm install pyclass bower install pyclass 特征 new Class([Parent,] function)简单类定义 self自我自动绑定,避免this __init__清除类的初始值设定项 __static__为类添加静态成员的最简单方法 parent()调用父方法 使用和演示 var Class = require ( 'pyclass' ) // Person as a Class var Person = new Class ( function ( ) { // __init_


【文件预览】:
pyclass-master
----bower.json(227B)
----test.js(1KB)
----LICENSE.md(1KB)
----README.md(2KB)
----.gitignore(116B)
----index.js(2KB)
----package.json(471B)

网友评论