js-mvc-framework
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -5,2 +5,3 @@ import objectAssign from './assign/index.js' | ||
import objectFreeze from './freeze/index.js' | ||
import objectSeal from './seal/index.js' | ||
@@ -12,3 +13,4 @@ export default function DETObjectVentilation() { | ||
// objectDefineProperty() | ||
objectFreeze() | ||
// objectFreeze() | ||
objectSeal() | ||
} |
@@ -5,3 +5,9 @@ import DynamicEventTarget from '../../../../../index.js' | ||
) { | ||
const { $eventTarget, $root } = $aliases | ||
const { | ||
$eventTarget, | ||
$root, | ||
$rootAlias, | ||
$basename, | ||
$path, | ||
} = $aliases | ||
const { recurse } = $options | ||
@@ -12,15 +18,45 @@ return Object.defineProperty( | ||
if(recurse === true) { | ||
for(const $propertyValue of Object.values($root)) { | ||
if($propertyValue instanceof DynamicEventTarget) { | ||
iterateProperties: | ||
for(const [ | ||
$propertyKey, $propertyValue | ||
] of Object.entries(this)) { | ||
if( | ||
$propertyValue.constructor.name === 'bound DynamicEventTarget' | ||
) { | ||
$propertyValue.addEventListener( | ||
'seal', ($event) => { | ||
const sealEventData = { | ||
path: $event.path, | ||
basename: $event.basename, | ||
} | ||
$trap.createEvent( | ||
$eventTarget, | ||
'seal', | ||
sealEventData, | ||
this, | ||
) | ||
} | ||
) | ||
$propertyValue.seal() | ||
} else { | ||
Object.seal($propertyValue) | ||
} | ||
const basename = $propertyKey | ||
const path = ( | ||
$path !== null | ||
) ? $path.concat('.', $propertyKey) | ||
: $propertyKey | ||
const sealEventData = { | ||
path: $path, | ||
basename: $basename, | ||
} | ||
$trap.createEvent( | ||
$eventTarget, | ||
'seal', | ||
sealEventData, | ||
this | ||
) | ||
} | ||
} | ||
Object.seal($root) | ||
$trap.createEvent( | ||
$eventTarget, | ||
'seal', | ||
{}, | ||
$root | ||
) | ||
Object.seal(this) | ||
return $root | ||
@@ -27,0 +63,0 @@ } |
{ | ||
"name": "js-mvc-framework", | ||
"author": "Thomas Patrick Welborn", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"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
1225253
255
13010
28