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

webidl2js

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webidl2js - npm Package Compare versions

Comparing version 6.0.3 to 6.1.0

5

lib/constructs/attribute.js

@@ -21,2 +21,3 @@ "use strict";

const shouldReflect = utils.getExtAttr(this.idl.extAttrs, "Reflect");
const sameObject = utils.getExtAttr(this.idl.extAttrs, "SameObject");

@@ -48,2 +49,6 @@ let objName = `this`;

if (sameObject) {
getterBody = `return utils.getSameObject(this, "${this.idl.name}", () => { ${getterBody} });`;
}
str += `Object.defineProperty(${definedOn}, "${this.idl.name}", {

@@ -50,0 +55,0 @@ get() {

@@ -16,3 +16,16 @@ "use strict";

const implSymbol = Symbol("impl");
const sameObjectCaches = Symbol("SameObject caches");
function getSameObject(wrapper, prop, creator) {
if (!wrapper[sameObjectCaches]) {
wrapper[sameObjectCaches] = Object.create(null);
}
if (prop in wrapper[sameObjectCaches]) {
return wrapper[sameObjectCaches][prop];
}
return wrapper[sameObjectCaches][prop] = creator();
}
function wrapperForImpl(impl) {

@@ -41,2 +54,3 @@ return impl ? impl[wrapperSymbol] : null;

module.exports.implSymbol = implSymbol;
module.exports.getSameObject = getSameObject;
module.exports.wrapperForImpl = wrapperForImpl;

@@ -43,0 +57,0 @@ module.exports.implForWrapper = implForWrapper;

2

package.json
{
"name": "webidl2js",
"version": "6.0.3",
"version": "6.1.0",
"description": "Auto-generates class structures for WebIDL specifications",

@@ -5,0 +5,0 @@ "main": "lib/transformer.js",

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