mirror of
https://github.com/flynx/object.js.git
synced 2025-10-29 10:30:08 +00:00
notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d80aca31fb
commit
ef59959299
@ -803,6 +803,8 @@ function(context, constructor, ...args){
|
||||
// the instanceof Function test, for that the prototype chain needs
|
||||
// to be rooted in Function.
|
||||
// though the typeof(..) == 'function' will always work.
|
||||
// NOTE: this will fail with non-identifier names...
|
||||
// XXX is this a bug or a feature??? =)
|
||||
var Constructor =
|
||||
module.Constructor =
|
||||
// shorthand...
|
||||
@ -874,6 +876,7 @@ function Constructor(name, a, b, c){
|
||||
_constructor.name == 'Constructor'
|
||||
// NOTE: this eval(..) should not be a risk as its inputs are
|
||||
// static and never infuenced by external inputs...
|
||||
// NOTE: this will fail with non-identifier names...
|
||||
&& eval('_constructor = '+ _constructor
|
||||
.toString()
|
||||
.replace(/Constructor/g, name))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user