From 8e31948e655736324ac5dbf7c207e63c7ed4d5a1 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 17 May 2020 22:57:25 +0300 Subject: [PATCH] docs... Signed-off-by: Alex A. Naanou --- README.md | 2 ++ object.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index ee19969..9006576 100755 --- a/README.md +++ b/README.md @@ -599,6 +599,8 @@ RawInstance(, , ..) - get result of `.__new__(..)` if defined, or - if prototype is a function or `.__call__(..)` is defined, create a wrapper function, or + - if constructor's `.__proto__` has a `.__rawinstance__(..)` use it + to create an instance, or - if constructor's `.__proto__` is a function (constructor) use it to create an instance, or - use `{}`. diff --git a/object.js b/object.js index ccbf2ca..8691a79 100755 --- a/object.js +++ b/object.js @@ -470,6 +470,8 @@ function(base, ...objects){ // -> call and use its return value // - if prototype is a function or if .__call__(..) is defined // -> use a wrapper function +// - if construct.__proto__ has .__rawinstance__(..) +// -> use it to create an instance // - if constructor.__proto__ is a constructor // -> use it to create an instance // - else