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

@boulevard/cdk

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@boulevard/cdk - npm Package Compare versions

Comparing version 1.0.0-alpha.5 to 1.0.0-alpha.6

6

package.json
{
"name": "@boulevard/cdk",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Component development kit.",

@@ -10,3 +10,3 @@ "main": "index.ts",

"peerDependencies": {
"@boulevard/lib": "^1.0.0-alpha.1",
"@boulevard/lib": "^1.0.0-alpha.3",
"lit-element": "^2.0.1",

@@ -17,3 +17,3 @@ "reflect-metadata": "^0.1.13",

"devDependencies": {
"@boulevard/lib": "^1.0.0-alpha.1",
"@boulevard/lib": "^1.0.0-alpha.3",
"lit-element": "^2.0.1",

@@ -20,0 +20,0 @@ "reflect-metadata": "^0.1.13",

@@ -0,4 +1,6 @@

import { ClassElementDescriptor } from '@boulevard/lib/src/types';
const sealed = Symbol('@bind:sealed');
export function bind<T>(target: T, methodName: string, descriptor: PropertyDescriptor) {
function lagacyBind<T>(target: T, methodName: string, descriptor: PropertyDescriptor): PropertyDescriptor {
return {

@@ -23,1 +25,34 @@ configurable: true,

}
function standardBind(elementDescriptor: ClassElementDescriptor): ClassElementDescriptor {
if (elementDescriptor.kind !== 'method') {
throw new Error('Attempting to bind to non-method');
}
elementDescriptor.extras = [{
descriptor: {
...elementDescriptor.descriptor,
value: undefined
},
initializer() {
return this[elementDescriptor.key].bind(this);
},
key: elementDescriptor.key,
kind: 'field',
placement: 'own'
}];
return elementDescriptor;
}
export function bind(descriptor: ClassElementDescriptor): ClassElementDescriptor;
export function bind<T>(target: T, methodName: string, descriptor: PropertyDescriptor): PropertyDescriptor;
export function bind(...args: any[]) {
if (args.length === 1) {
// @ts-ignore
return standardBind(...args);
}
// @ts-ignore
return lagacyBind(...args);
}

@@ -1,2 +0,2 @@

import { closest as closestElement } from "@boulevard/lib/src/element";
import { closest as closestElement } from '@boulevard/lib/src/element';

@@ -3,0 +3,0 @@ export function closest(selector: string) {

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