js-mvc-framework
Advanced tools
Comparing version 1.2.0 to 1.2.1
# Accessor Traps | ||
**MVC Framework \| Class System \| Model \| Content \| Handler \| Traps \| *Accessor*** | ||
**Content** | ||
- [Accessor Handler Trap Options]() | ||
- [`set` Options]() | ||
- [`get` Options]() | ||
- [`delete` Options]() | ||
- [Accessor Handler Trap Methods]() | ||
- [`set` Method]() | ||
- [`get` Method]() | ||
- [`delete` Method]() | ||
## Accessor Handler Trap Options | ||
Accessor Handler Trap Options are defined with new `Content` Instance creation. | ||
``` | ||
import { Content } from 'mvc-framework' | ||
const $contentOptions = { | ||
traps: { | ||
accessor: { | ||
get: { | ||
pathkey: true, | ||
events: [ | ||
'get', | ||
'getProperty' | ||
], | ||
}, | ||
set: { | ||
pathkey: true, | ||
recursive: true, | ||
events: [ | ||
'set', | ||
'setProperty' | ||
], | ||
}, | ||
delete: { | ||
pathkey: true, | ||
events: [ | ||
'delete', | ||
'deleteProperty' | ||
], | ||
}, | ||
} | ||
} | ||
} | ||
const content = new Content({}, null, $contentOptions) | ||
``` | ||
### `get` Options | ||
#### `get.pathkey` Option | ||
#### `get.events` Option | ||
##### `get` Event Type | ||
##### `getProperty` Event Type | ||
### `set` Options | ||
#### `set.pathkey` Option | ||
#### `set.recursive` | ||
#### `set.events` Option | ||
##### `set` Event Type | ||
##### `setProperty` Event Type | ||
### `delete` Options | ||
#### `delete.pathkey` Option | ||
#### `delete.events` Option | ||
##### `delete` Event Type | ||
##### `deleteProperty` Event Type | ||
## Accessor Handler Trap Methods | ||
### `get` Method | ||
Accepts zero or one arguments: | ||
``` | ||
content.get() | ||
content.get($propertyPath) | ||
``` | ||
- **Zero Arguments**: Gets all properties (gets `content`, or self) | ||
- **One Argument**: Gets property value at `$propertyPath`. | ||
#### `get` Arguments | ||
##### `$propertyPath` Argument | ||
**Type**: `String` Literal | ||
**Descript**: | ||
Dot-notation path to property, or property key. | ||
### `set` Method | ||
Accepts one or two arguments: | ||
``` | ||
content.set($propertyTree) | ||
content.set($propertyPath, $propertyValue) | ||
``` | ||
- **One Argument**: Sets all properties from `$propertyTree` to `content`. | ||
- **Two Arguments**: Sets `$propertyValue` at `$propertyPath` | ||
#### `set` Arguments | ||
##### `$propertyTree` Argument | ||
**Type**: `Object` Literal, `Array` Literal, `Content` Instance | ||
**Descript**: | ||
##### `$propertyPath` Argument | ||
**Type**: `String` Literal | ||
**Descript**: | ||
Dot-notation path to property, or property key. | ||
##### `$propertyValue` Argument | ||
**Type**: `Mixed` | ||
**Descript**: | ||
Property value assigned to `$propertyPath`. | ||
### `delete` Method | ||
Accepts zero or one arguments: | ||
``` | ||
content.delete() | ||
content.delete($propertyPath) | ||
``` | ||
- **Zero Arguments**: Deletes all properties from `content`. | ||
- **One Argument**: Deletes property value at `$propertyPath`. | ||
#### `delete` Arguments | ||
##### `$propertyPath` Argument | ||
**Type**: `String` Literal | ||
**Descript**: | ||
Dot-notation path to property, or property key. |
# Array Traps | ||
**MVC Framework \| Class System \| Model \| Content \| Handler \| Traps \| *Array*** | ||
**Content** | ||
- [Array Handler Trap Options]() | ||
- [`concat` Options]() | ||
- [ `concat.events` Option]() | ||
- [`copyWithin` Options]() | ||
- [ `copyWithin.events` Option]() | ||
- [`fill` Options]() | ||
- [ `fill.events` Option]() | ||
- [`pop` Options]() | ||
- [ `pop.events` Option]() | ||
- [`push` Options]() | ||
- [ `push.events` Option]() | ||
- [`reverse` Options]() | ||
- [ `reverse.events` Option]() | ||
- [`shift` Options]() | ||
- [ `shift.events` Option]() | ||
- [`splice` Options]() | ||
- [ `splice.events` Option]() | ||
- [`unshift` Options]() | ||
- [ `unshift.events` Option]() | ||
- [Array Handler Trap Methods]() | ||
- [`concat` Method]() | ||
- [`concat` Arguments]() | ||
- [`copyWithin` Method]() | ||
- [`copyWithin` Arguments]() | ||
- [`fill` Method]() | ||
- [`fill` Arguments]() | ||
- [`pop` Method]() | ||
- [`pop` Arguments]() | ||
- [`push` Method]() | ||
- [`push` Arguments]() | ||
- [`reverse` Method]() | ||
- [`reverse` Arguments]() | ||
- [`shift` Method]() | ||
- [`shift` Arguments]() | ||
- [`splice` Method]() | ||
- [`splice` Arguments]() | ||
- [`unshift` Method]() | ||
- [`unshift` Arguments]() | ||
## Array Handler Trap Options | ||
Array Handler Trap Options are defined with new `Content` Instance creation. | ||
``` | ||
import { Content } from 'mvc-framework' | ||
const $contentOptions = { | ||
traps: { | ||
array: { | ||
concat: { | ||
events: [ | ||
'concatValue', | ||
'concat' | ||
] | ||
}, | ||
copyWithin: { | ||
events: [ | ||
'copyWithinIndex', | ||
'copyWithin' | ||
] | ||
}, | ||
fill: { | ||
events: [ | ||
'fillIndex', | ||
'fill' | ||
] | ||
}, | ||
pop: { | ||
events: ['pop'] | ||
}, | ||
push: { | ||
events: [ | ||
'pushProp', | ||
'push' | ||
] | ||
}, | ||
reverse: { | ||
events: ['reverse'] | ||
}, | ||
shift: { | ||
events: ['shift'] | ||
}, | ||
splice: { | ||
events: [ | ||
'spliceDelete', | ||
'spliceAdd', | ||
'splice' | ||
] | ||
}, | ||
unshift: { | ||
events: [ | ||
'unshiftProp', | ||
'unshift' | ||
] | ||
}, | ||
} | ||
} | ||
} | ||
const content = new Content([], null, $contentOptions) | ||
``` | ||
### `concat` Options | ||
#### `concat.events` Option | ||
### `copyWithin` Options | ||
#### `copyWithin.events` Option | ||
### `fill` Options | ||
#### `fill.events` Option | ||
### `pop` Options | ||
#### `pop.events` Option | ||
### `push` Options | ||
#### `push.events` Option | ||
### `reverse` Options | ||
#### `reverse.events` Option | ||
### `shift` Options | ||
#### `shift.events` Option | ||
### `splice` Options | ||
#### `splice.events` Option | ||
### `unshift` Options | ||
#### `unshift.events` Option | ||
## Array Handler Trap Methods | ||
### `concat` Method | ||
#### `concat` Arguments | ||
### `copyWithin` Method | ||
#### `copyWithin` Arguments | ||
### `fill` Method | ||
#### `fill` Arguments | ||
### `pop` Method | ||
#### `pop` Arguments | ||
### `push` Method | ||
#### `push` Arguments | ||
### `reverse` Method | ||
#### `reverse` Arguments | ||
### `shift` Method | ||
#### `shift` Arguments | ||
### `splice` Method | ||
#### `splice` Arguments | ||
### `unshift` Method | ||
#### `unshift` Arguments |
# Object Traps | ||
**MVC Framework \| Class System \| Model \| Content \| Handler \| Traps \| *Object*** | ||
**Content** | ||
- Object Handler Trap Options | ||
- [Object Handler Trap Options]() | ||
- [`assign` Options]() | ||
@@ -28,3 +28,3 @@ - [`assign.sourceTree` Option]() | ||
## Object Handler Trap Options | ||
Object Handler Trap Options are defined with new `Content` Class Instance creation. | ||
Object Handler Trap Options are defined with new `Content` Instance creation. | ||
**Defaults**: | ||
@@ -86,6 +86,11 @@ ``` | ||
## Object Handler Trap Methods | ||
### `assign` Trap Method | ||
### `defineProperties` Trap Method | ||
### `defineProperty` Trap Method | ||
### `freeze` Trap Method | ||
### `seal` Trap Method | ||
### `assign` Method | ||
#### `assign` Arguments | ||
### `defineProperties` Method | ||
#### `defineProperties` Arguments | ||
### `defineProperty` Method | ||
#### `defineProperty` Arguments | ||
### `freeze` Method | ||
#### `freeze` Arguments | ||
### `seal` Method | ||
#### `seal` Arguments |
{ | ||
"name": "js-mvc-framework", | ||
"author": "Thomas Patrick Welborn", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -10,17 +10,4 @@ > [!WARNING] | ||
> thomas.patrick.welborn@outlook.com | ||
# MVC Framework | ||
MVC Framework is a Javascript implementation of the **[Presentation-Abstraction-Control (PAC) Pattern](https://en.wikipedia.org/wiki/Presentation%E2%80%93abstraction%E2%80%93control)** | ||
## Features | ||
- Dynamic Event Target (DET) ventilates Object, Array, and Map property modifier functions. | ||
- Dynamic Event System (DES) facilitates Event Target/Dynamic Event Target property assignment and ablement. | ||
- Fetch Router interfacilates client/server endpoint calls and callbacks. | ||
## Documents | ||
### MVC Framework Guide | ||
DET Guide | ||
DET Object Guide | ||
- Document | ||
- Guide | ||
- [Dynamic Event Target (DET)](./document/guide/DynamicEventTarget/index.md) | ||
- [DET Object](./document/guide/DynamicEventTarget/DET-Object/index.md) | ||
- [Dynamic Event System (DES)](./document/guid/DynamicEventSystem/index.md) | ||
### Demonstration |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1489990
5
13