New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-mvc-framework

Package Overview
Dependencies
Maintainers
0
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-mvc-framework - npm Package Compare versions

Comparing version 1.2.5 to 1.2.6

37

demonstrament/documents/index.js

@@ -8,3 +8,3 @@ import { Content } from '/dependencies/mvc-framework.js'

) }
// const object = new Content({propertyA: { propertyB: "BBB" }})
const object = new Content({propertyA: { propertyB: "BBB" }})
const array = new Content(

@@ -15,26 +15,19 @@ [

)
// console.log(object.classToString)
// console.log(array.get('0').push(object))
// array.get('0').push(object)
// array.set('0', {propertyA: { propertyB: "BBB" }})
array.get("0")
.set("0", { propertyA: { propertyB: "BBB" } } )
console.log(array.string)
array.get("0.0")
.assign({ propertyA: { propertyB: "BBBBBB" } } )
array.get("0")
.assign({
array.get('0').push(object)
array.get("0").set("0", { propertyA: { propertyB: "BBB" } } )
array.get("0.0").assign({ propertyA: { propertyB: "BBBBBB" } } )
array.get("0").assign({
"1": { propertyA: { propertyB: "BBB" } }
})
console.log(array.string)
array.get("0.1.propertyA")
.set("propertyB", "BBBBBB")
console.log(array.string)
array.get("0")
.assign([
{ propertyA: { propertyB: "BBB" } },
{ propertyA: { propertyB: "BBBBBB" } }
])
console.log(array.string)
console.log(array.get("1"))
// array.get("0.1.propertyA")
// .set("propertyB", "BBBBBB")
// console.log(array.string)
// array.get("0")
// .assign([
// { propertyA: { propertyB: "BBB" } },
// { propertyA: { propertyB: "BBBBBB" } }
// ])
// console.log(array.string)
// console.log(array.get("1"))
/*

@@ -41,0 +34,0 @@ const object = new Content()

@@ -9,3 +9,3 @@ import { regularExpressions } from '../../../../../../../Coutil/index.js'

const { contentEvents } = $content.options
const { proxy } = $conten
const { proxy } = $content
// Arguments

@@ -12,0 +12,0 @@ const $path = arguments[0]

@@ -71,8 +71,6 @@ import { regularExpressions } from '../../../../../../../Coutil/index.js'

// Return: Property
// Value: Content
if(propertyValue?.classToString === Content.toString()) {
propertyValue = Object.assign($value, { path: _path, parent: proxy })
}
// Value: Object Literal
else if(typeof $value === 'object') {
// Value: Content
if($value?.classToString === Content.toString()) { $value = $value.object }
let subschema

@@ -79,0 +77,0 @@ if(schema?.contextType === 'array') { subschema = schema.context[0] }

@@ -37,8 +37,6 @@ import Content from '../../../../index.js'

: valueIndex
// Value: Content
if($value.classToString === Content.toString()) {
values[valueIndex] = Object.assign(value, { path: _path, parent: proxy })
}
// Value: Object Type
else if(typeof $value === 'object') {
if(typeof $value === 'object') {
// Value: Content
if($value?.classToString === Content.toString()) { $value = $value.object }
let subschema = schema?.context[0] || null

@@ -45,0 +43,0 @@ const value = new Content($value, subschema, {

@@ -46,6 +46,4 @@ import Content from '../../../../index.js'

let value = $arguments[0]
if(value.classToString === Content.toString()) {
value = Object.assign(value, { path: _path, parent: proxy })
}
else if(typeof value === 'object') {
if(typeof value === 'object') {
if(value?.classToString === Content.toString()) { value = value.object }
const subschema = schema?.context[0] || null

@@ -52,0 +50,0 @@ value = new Content(value, subschema, {

@@ -30,6 +30,4 @@ import Content from '../../../../index.js'

: elementsIndex
if($element.classToString !== Content.toString()) {
$element = Object.assign($element, { path: _path, parent: proxy })
}
else if(typeof $element === 'object') {
if(typeof $element === 'object') {
if($element?.classToString === Content.toString()) { $element = $element.object }
const subschema = schema?.context[0] || null

@@ -36,0 +34,0 @@ $element = new Content($element, subschema, {

@@ -65,6 +65,4 @@ import Content from '../../../../index.js'

// Add Item: Object Type
if(addItem.classToString !== Content.toString()) {
addItem = Object.assign(addItem, { path: _path, parent: proxy })
}
if(typeof addItem === 'object') {
if(addItem?.classToString === Content.toString()) { addItem = addItem.object }
const subschema = schema?.context[0] || null

@@ -71,0 +69,0 @@ addItem = new Content(addItem, subschema, {

@@ -37,2 +37,3 @@ import { recursiveAssign } from '../../../../../../Coutil/index.js'

if(typeof $sourcePropVal === 'object') {
if($sourcePropVal?.classToString === Content.toString()) { $sourcePropVal = $sourcePropVal.object }
// Subschema

@@ -47,6 +48,3 @@ let subschema

: $sourcePropKey
const content = new Content($sourcePropVal, subschema, recursiveAssign({}, $content.options, {
path: _path,
parent: proxy,
}))
let sourcePropVal = root[$sourcePropKey]
// Assignment

@@ -60,13 +58,16 @@ let assignment

else {
const sourcePropVal = root[$sourcePropKey]
// Assignment: Existing Content Instance
if(sourcePropVal?.classToString === Content.toString()) {
sourcePropVal.assign($sourcePropVal)
Object.assign(sourcePropVal, { path: _path, parent: proxy })
assignment = { [$sourcePropKey]: sourcePropVal }
}
// Assignment: New Content Instance
else {
assignment = { [$sourcePropKey]: content }
sourcePropVal = new Content($sourcePropVal, subschema,
recursiveAssign({}, $content.options, {
path: _path,
parent: proxy,
})
)
}
assignment = { [$sourcePropKey]: sourcePropVal }
}

@@ -73,0 +74,0 @@ // Assignment

{
"name": "js-mvc-framework",
"author": "Thomas Patrick Welborn",
"version": "1.2.5",
"version": "1.2.6",
"type": "module",

@@ -6,0 +6,0 @@ "scripts": {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc