doc updates...

This commit is contained in:
Alex A. Naanou 2019-07-17 00:26:39 +03:00
parent 57d9f3d2c9
commit 9525667270
7 changed files with 29 additions and 9 deletions

5
.npmignore Normal file
View File

@ -0,0 +1,5 @@
.npm*
*.vim
*.sw[po]
.git
npm-debug.log

BIN
.object.js.swp Normal file

Binary file not shown.

BIN
.package.json.swp Normal file

Binary file not shown.

0
LICENSE Executable file → Normal file
View File

30
README.md Executable file → Normal file
View File

@ -57,7 +57,29 @@ c instanceof A // -> true
``` ```
```javascript ```javascript
var Base = object.makeConstructor() var Base = object.Constructor('Base', {
get prop(){
return 123 },
method: function(){
console.log('Base.method()') },
// initializer...
__init__: function(){
this.base_attribute = 321
},
})
var Item = object.Constructor('Item', {
// inherit from BaseItem...
__proto__: Base.prototype,
__init__: function(){
// call the "super" method...
object.parent(this.__init__, this).call(this)
this.item_attribute = 333
},
})
``` ```
@ -83,10 +105,6 @@ mixinFlat(<root>, <object>, ...)
makeConstructor(<name>, <prototype>) makeConstructor(<name>, <prototype>)
makeConstructor(<name>, <class-prototype>, <prototype>) makeConstructor(<name>, <class-prototype>, <prototype>)
-> <constructor> -> <constructor>
makeConstructor(<name>, <init-function>)
makeConstructor(<name>, <class-prototype>, <init-function>)
-> <constructor>
``` ```
@ -95,7 +113,7 @@ makeConstructor(<name>, <class-prototype>, <init-function>)
[BSD 3-Clause License](./LICENSE) [BSD 3-Clause License](./LICENSE)
Copyright (c) 2019, Alex A. Naanou, Copyright (c) 2019, Alex A. Naanou,
All rights reserved. All rights reserved.
<!-- vim:set ts=4 sw=4 spell : --> <!-- vim:set ts=4 sw=4 spell : -->

3
object.js Executable file → Normal file
View File

@ -292,8 +292,5 @@ function Constructor(name, a, b){
/********************************************************************** /**********************************************************************
* vim:set ts=4 sw=4 : */ return module }) * vim:set ts=4 sw=4 : */ return module })

0
package.json Executable file → Normal file
View File