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

generate-js-bindings

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generate-js-bindings - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

50

bindings.js

@@ -33,2 +33,16 @@ var EventEmitter = require('generate-js-events');

function makeGetter(bindable, property) {
return function getter() {
var _ = this;
return bindable.get(property);
};
}
function makeSetter(bindable, property) {
return function setter() {
var _ = this;
return bindable.set(property);
};
}
Bindable.generateGetters = function generateGetter(bindable, descriptor, properties) {

@@ -42,13 +56,8 @@ var getters = {},

function makeGetter(property) {
return function getter() {
var _ = this;
return bindable.get(property);
for (var i = 0; i < properties.length; i++) {
getters[properties[i]] = {
get: makeGetter(bindable, properties[i])
};
}
for (var i = 0; i < properties.length; i++) {
getters[properties[i]] = { get: makeGetter(properties[i]) };
}
bindable.definePrototype(descriptor, getters);

@@ -65,14 +74,27 @@ };

function makeSetter(property) {
return function setter() {
var _ = this;
return bindable.set(property);
for (var i = 0; i < properties.length; i++) {
setters[properties[i]] = {
set: makeSetter(bindable, properties[i])
};
}
bindable.definePrototype(descriptor, setters);
};
Bindable.generateGettersSetters = function generateGetter(bindable, descriptor, properties) {
var gettersSetters = {},
p = properties || descriptor,
d = properties && descriptor;
properties = (p && typeof p === 'object') ? p : {};
descriptor = (d && typeof d === 'object') ? d : { enumerable: true };
for (var i = 0; i < properties.length; i++) {
setters[properties[i]] = { set: makeSetter(properties[i]) };
gettersSetters[properties[i]] = {
get: makeGetter(bindable, properties[i]),
set: makeSetter(bindable, properties[i])
};
}
bindable.definePrototype(descriptor, setters);
bindable.definePrototype(descriptor, gettersSetters);
};

@@ -79,0 +101,0 @@

{
"name": "generate-js-bindings",
"version": "1.0.6",
"version": "1.0.7",
"description": "A data binding layer for Generate JS.",

@@ -27,4 +27,4 @@ "main": "bindings.js",

"dependencies": {
"generate-js-events": "^2.1.2"
"generate-js-events": "^2.1.3"
}
}
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