Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@live-change/dao

Package Overview
Dependencies
Maintainers
1
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@live-change/dao - npm Package Compare versions

Comparing version 0.2.9 to 0.2.10

14

lib/ObservableList.js

@@ -26,3 +26,3 @@ const Observable = require("./Observable.js")

this.fireObservers('set', list)
for(var [object, property] of this.properties) {
for(const [object, property] of this.properties) {
object[property] = list

@@ -129,3 +129,3 @@ }

let jsonf = []
for(var k in fields) {
for(const k in fields) {
jsonf.push([k, JSON.stringify(fields[k])])

@@ -149,4 +149,4 @@ }

unbindProperty(object, property) {
for(var i = 0; i < this.properties.length; i++) {
var prop = this.properties[i]
for(let i = 0; i < this.properties.length; i++) {
const prop = this.properties[i]
if(prop[0] == object && prop[1] == property) {

@@ -167,4 +167,4 @@ this.properties.splice(i,1)

unbindErrorProperty(object, property) {
for(var i = 0; i < this.errorProperties.length; i++) {
var prop = this.errorProperties[i]
for(let i = 0; i < this.errorProperties.length; i++) {
const prop = this.errorProperties[i]
if(prop[0] == object && prop[1] == property) {

@@ -182,3 +182,3 @@ this.errorProperties.splice(i,1)

let handled = super.handleError(error)
for(var [object, property] of this.errorProperties) {
for(const [object, property] of this.errorProperties) {
handled = true

@@ -185,0 +185,0 @@ object[property] = error

@@ -58,3 +58,3 @@ const EventEmitter = require("./EventEmitter.js")

if(!defn.generator) defn.generator = (value, what) => new ObservableList(value)
defn.source = new RemoteDataSource(connection, defn.generator)
defn.source = new RemoteDataSource(connection, defn)
return defn

@@ -61,0 +61,0 @@ break;

class RemoteDataSource {
constructor(connection, generator) {
constructor(connection, definition) {
this.definition = definition
this.connection = connection
this.generator = generator
this.generator = definition.generator
this.redirect = definition.redirect || (x=>x)
}
observable(what) {
return this.connection.observable(what, this.generator)
return this.connection.observable(this.redirect(what), this.generator)
}
get(what) {
return this.connection.get(what)
return this.connection.get(this.redirect(what))
}
request(method, ...args) {
return this.connection.request(method, ...args)
return this.connection.request(this.redirect(method), ...args)
}
event(method, ...args) {
return this.connection.event(method, ...args)
return this.connection.event(this.redirect(method), ...args)
}

@@ -18,0 +20,0 @@ }

@@ -39,3 +39,3 @@ {

},
"version": "0.2.9"
"version": "0.2.10"
}
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