js-mvc-framework
Advanced tools
Comparing version 1.0.8 to 1.0.9
import objectAssign from './assign/index.js' | ||
import defineProperties from './defineProperties/index.js' | ||
import defineProperty from './defineProperty/index.js' | ||
import objectDefineProperties from './defineProperties/index.js' | ||
import objectDefineProperty from './defineProperty/index.js' | ||
import objectFreeze from './freeze/index.js' | ||
@@ -8,4 +9,5 @@ export default function DETObjectVentilation() { | ||
// objectAssign() | ||
// defineProperties() | ||
defineProperty() | ||
// objectDefineProperties() | ||
// objectDefineProperty() | ||
objectFreeze() | ||
} |
@@ -5,3 +5,9 @@ import DynamicEventTarget from '../../../../../index.js' | ||
) { | ||
const { $eventTarget, $root } = $aliases | ||
const { | ||
$eventTarget, | ||
$root, | ||
$rootAlias, | ||
$basename, | ||
$path, | ||
} = $aliases | ||
const { recurse } = $options | ||
@@ -12,19 +18,45 @@ return Object.defineProperty( | ||
if(recurse === true) { | ||
iterateProperties: | ||
for(const [ | ||
$propertyKey, $propertyValue | ||
] of Object.entries($root)) { | ||
] of Object.entries(this)) { | ||
if( | ||
$propertyValue.constructor.name === 'bound DynamicEventTarget' | ||
) { | ||
$propertyValue.addEventListener( | ||
'freeze', ($event) => { | ||
const freezeEventData = { | ||
path: $event.path, | ||
basename: $event.basename, | ||
} | ||
$trap.createEvent( | ||
$eventTarget, | ||
'freeze', | ||
freezeEventData, | ||
this, | ||
) | ||
} | ||
) | ||
$propertyValue.freeze() | ||
} else { | ||
Object.freeze($propertyValue) | ||
} | ||
const basename = $propertyKey | ||
const path = ( | ||
$path !== null | ||
) ? $path.concat('.', $propertyKey) | ||
: $propertyKey | ||
const freezeEventData = { | ||
path: $path, | ||
basename: $basename, | ||
} | ||
$trap.createEvent( | ||
$eventTarget, | ||
'freeze', | ||
freezeEventData, | ||
this | ||
) | ||
} | ||
} | ||
Object.freeze($root) | ||
$trap.createEvent( | ||
$eventTarget, | ||
'freeze', | ||
{}, | ||
$root | ||
) | ||
Object.freeze(this) | ||
return $root | ||
@@ -31,0 +63,0 @@ } |
{ | ||
"name": "js-mvc-framework", | ||
"author": "Thomas Patrick Welborn", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "main": "./development/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
1218555
254
12890