Comparing version 0.2.10 to 0.2.11
{ | ||
"name": "jeefo", | ||
"version": "0.2.10", | ||
"version": "0.2.11", | ||
"homepage": "https://github.com/je3f0o/jeefo", | ||
@@ -5,0 +5,0 @@ "copyright": "2021", |
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
* File Name : class_transpiler.js | ||
* Created at : 2020-12-29 | ||
* Updated at : 2021-01-09 | ||
* Updated at : 2021-04-14 | ||
* Author : jeefo | ||
@@ -231,4 +231,6 @@ * Purpose : | ||
if (_class.has_heritage) { | ||
const value = `Object.create(${_class.super.name}.prototype)`; | ||
wrapper_tail = `} ${_class._name}.prototype = ${value};`; | ||
const value = `Object.create(${_class.super.name}.prototype)`; | ||
const proto = `${_class._name}.prototype`; | ||
const constructor = `${proto}.constructor = ${_class._name}`; | ||
wrapper_tail = `} ${proto} = ${value}; ${constructor};`; | ||
} | ||
@@ -384,2 +386,8 @@ if (has_before_wrapped) { | ||
class_head += ` function ${node._name} () {}`; | ||
if (node.has_heritage) { | ||
const proto = `${node._name}.prototype`; | ||
const inheritance = `Object.create(${_super.name}.prototype)`; | ||
class_head += ` ${proto} = ${inheritance};`; | ||
class_head += ` ${proto}.constructor = ${node._name};`; | ||
} | ||
} | ||
@@ -464,2 +472,8 @@ | ||
class_head += ` function ${node._name} () {}`; | ||
if (node.has_heritage) { | ||
const proto = `${node._name}.prototype`; | ||
const inheritance = `Object.create(${_super.name}.prototype)`; | ||
class_head += ` ${proto} = ${inheritance};`; | ||
class_head += ` ${proto}.constructor = ${node._name};`; | ||
} | ||
} | ||
@@ -466,0 +480,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
506128
10811