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

skatejs

Package Overview
Dependencies
Maintainers
8
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skatejs - npm Package Compare versions

Comparing version 5.2.1 to 5.2.2

6

dist/es/util.js

@@ -17,8 +17,2 @@ export function dashCase(str) {

return Object.getOwnPropertySymbols ? names.concat(Object.getOwnPropertySymbols(obj)) : names;
}
var symbolCount = 0;
export function sym(description) {
description = String(description || ++symbolCount);
return typeof Symbol === 'function' ? Symbol(description) : '__skate_' + description;
}

11

dist/es/with-renderer.js

@@ -35,11 +35,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

key: 'updated',
value: function updated() {
var _get2,
_this2 = this;
value: function updated(prevProps, prevState) {
var _this2 = this;
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_get(_class2.prototype.__proto__ || Object.getPrototypeOf(_class2.prototype), 'updated', this) && (_get2 = _get(_class2.prototype.__proto__ || Object.getPrototypeOf(_class2.prototype), 'updated', this)).call.apply(_get2, [this].concat(args));
_get(_class2.prototype.__proto__ || Object.getPrototypeOf(_class2.prototype), 'updated', this) && _get(_class2.prototype.__proto__ || Object.getPrototypeOf(_class2.prototype), 'updated', this).call(this, prevProps, prevState);
this.rendering && this.rendering();

@@ -46,0 +41,0 @@ this.renderer(this.renderRoot, function () {

@@ -15,5 +15,5 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

import { dashCase, empty, keys, sym } from './util.js';
import { dashCase, empty, keys } from './util.js';
export function normaliseAttributeDefinition(name, prop) {
export function normalizeAttributeDefinition(name, prop) {
var attribute = prop.attribute;

@@ -38,3 +38,3 @@

export function normalisePropertyDefinition(name, prop) {
export function normalizePropertyDefinition(name, prop) {
var coerce = prop.coerce,

@@ -46,3 +46,3 @@ def = prop.default,

return {
attribute: normaliseAttributeDefinition(name, prop),
attribute: normalizeAttributeDefinition(name, prop),
coerce: coerce || identity,

@@ -58,3 +58,3 @@ default: def,

function defineProps(constructor) {
if (constructor.hasOwnProperty('_propsNormalised')) return;
if (constructor.hasOwnProperty('_propsNormalized')) return;
var props = constructor.props;

@@ -85,15 +85,15 @@

var normalised = normalisePropertyDefinition(name, propertyDefinition);
var normalized = normalizePropertyDefinition(name, propertyDefinition);
// Ensure that we can cache properties. We have to do this so the _props object literal doesn't modify parent
// classes or share the instance anywhere where it's not intended to be shared explicitly in userland code.
if (!constructor.hasOwnProperty('_propsNormalised')) {
constructor._propsNormalised = {};
if (!constructor.hasOwnProperty('_propsNormalized')) {
constructor._propsNormalized = {};
}
// Cache the value so we can reference when syncing the attribute to the property.
constructor._propsNormalised[name] = normalised;
var _normalised$attribute = normalised.attribute,
source = _normalised$attribute.source,
target = _normalised$attribute.target;
constructor._propsNormalized[name] = normalized;
var _normalized$attribute = normalized.attribute,
source = _normalized$attribute.source,
target = _normalized$attribute.target;

@@ -113,7 +113,7 @@

var val = this._props[name];
return val == null ? normalised.default : val;
return val == null ? normalized.default : val;
},
set: function set(val) {
var target = normalised.attribute.target,
serialize = normalised.serialize;
var target = normalized.attribute.target,
serialize = normalized.serialize;

@@ -128,3 +128,3 @@ if (target) {

}
this._props[name] = normalised.coerce(val);
this._props[name] = normalized.coerce(val);
this.triggerUpdate();

@@ -170,3 +170,3 @@ }

_attributeToPropertyMap = _constructor._attributeToPropertyMap,
_propsNormalised = _constructor._propsNormalised;
_propsNormalized = _constructor._propsNormalized;

@@ -180,3 +180,3 @@

if (propertyName) {
var propertyDefinition = _propsNormalised[propertyName];
var propertyDefinition = _propsNormalized[propertyName];
if (propertyDefinition) {

@@ -183,0 +183,0 @@ var defaultValue = propertyDefinition.default,

@@ -15,8 +15,2 @@ export function dashCase(str) {

return Object.getOwnPropertySymbols ? names.concat(Object.getOwnPropertySymbols(obj)) : names;
}
let symbolCount = 0;
export function sym(description) {
description = String(description || ++symbolCount);
return typeof Symbol === 'function' ? Symbol(description) : `__skate_${description}`;
}

@@ -18,4 +18,4 @@ import { shadow } from './shadow.js';

updated(...args) {
super.updated && super.updated(...args);
updated(prevProps, prevState) {
super.updated && super.updated(prevProps, prevState);
this.rendering && this.rendering();

@@ -22,0 +22,0 @@ this.renderer(this.renderRoot, () => this.render && this.render(this));

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
import { dashCase, empty, keys, sym } from './util.js';
import { dashCase, empty, keys } from './util.js';
export function normaliseAttributeDefinition(name, prop) {
export function normalizeAttributeDefinition(name, prop) {
const { attribute } = prop;

@@ -24,6 +24,6 @@ const obj = typeof attribute === 'object' ? _extends({}, attribute) : {

export function normalisePropertyDefinition(name, prop) {
export function normalizePropertyDefinition(name, prop) {
const { coerce, default: def, deserialize, serialize } = prop;
return {
attribute: normaliseAttributeDefinition(name, prop),
attribute: normalizeAttributeDefinition(name, prop),
coerce: coerce || identity,

@@ -39,3 +39,3 @@ default: def,

function defineProps(constructor) {
if (constructor.hasOwnProperty('_propsNormalised')) return;
if (constructor.hasOwnProperty('_propsNormalized')) return;
const { props } = constructor;

@@ -63,13 +63,13 @@ keys(props).forEach(name => {

const func = function ({ constructor }, name) {
const normalised = normalisePropertyDefinition(name, propertyDefinition);
const normalized = normalizePropertyDefinition(name, propertyDefinition);
// Ensure that we can cache properties. We have to do this so the _props object literal doesn't modify parent
// classes or share the instance anywhere where it's not intended to be shared explicitly in userland code.
if (!constructor.hasOwnProperty('_propsNormalised')) {
constructor._propsNormalised = {};
if (!constructor.hasOwnProperty('_propsNormalized')) {
constructor._propsNormalized = {};
}
// Cache the value so we can reference when syncing the attribute to the property.
constructor._propsNormalised[name] = normalised;
const { attribute: { source, target } } = normalised;
constructor._propsNormalized[name] = normalized;
const { attribute: { source, target } } = normalized;

@@ -88,6 +88,6 @@ if (source) {

const val = this._props[name];
return val == null ? normalised.default : val;
return val == null ? normalized.default : val;
},
set(val) {
const { attribute: { target }, serialize } = normalised;
const { attribute: { target }, serialize } = normalized;
if (target) {

@@ -101,3 +101,3 @@ const serializedVal = serialize ? serialize(val) : val;

}
this._props[name] = normalised.coerce(val);
this._props[name] = normalized.coerce(val);
this.triggerUpdate();

@@ -165,3 +165,3 @@ }

_attributeToPropertyMap,
_propsNormalised
_propsNormalized
} = this.constructor;

@@ -175,3 +175,3 @@

if (propertyName) {
const propertyDefinition = _propsNormalised[propertyName];
const propertyDefinition = _propsNormalized[propertyName];
if (propertyDefinition) {

@@ -178,0 +178,0 @@ const { default: defaultValue, deserialize } = propertyDefinition;

@@ -8,3 +8,2 @@ 'use strict';

exports.keys = keys;
exports.sym = sym;
function dashCase(str) {

@@ -24,8 +23,2 @@ return typeof str === 'string' ? str.split(/([_A-Z])/).reduce((one, two, idx) => {

return Object.getOwnPropertySymbols ? names.concat(Object.getOwnPropertySymbols(obj)) : names;
}
let symbolCount = 0;
function sym(description) {
description = String(description || ++symbolCount);
return typeof Symbol === 'function' ? Symbol(description) : `__skate_${description}`;
}

@@ -25,4 +25,4 @@ 'use strict';

updated(...args) {
super.updated && super.updated(...args);
updated(prevProps, prevState) {
super.updated && super.updated(prevProps, prevState);
this.rendering && this.rendering();

@@ -29,0 +29,0 @@ this.renderer(this.renderRoot, () => this.render && this.render(this));

@@ -10,4 +10,4 @@ 'use strict';

exports.normaliseAttributeDefinition = normaliseAttributeDefinition;
exports.normalisePropertyDefinition = normalisePropertyDefinition;
exports.normalizeAttributeDefinition = normalizeAttributeDefinition;
exports.normalizePropertyDefinition = normalizePropertyDefinition;
exports.prop = prop;

@@ -17,3 +17,3 @@

function normaliseAttributeDefinition(name, prop) {
function normalizeAttributeDefinition(name, prop) {
const attribute = prop.attribute;

@@ -38,3 +38,3 @@

function normalisePropertyDefinition(name, prop) {
function normalizePropertyDefinition(name, prop) {
const coerce = prop.coerce,

@@ -46,3 +46,3 @@ def = prop.default,

return {
attribute: normaliseAttributeDefinition(name, prop),
attribute: normalizeAttributeDefinition(name, prop),
coerce: coerce || identity,

@@ -58,3 +58,3 @@ default: def,

function defineProps(constructor) {
if (constructor.hasOwnProperty('_propsNormalised')) return;
if (constructor.hasOwnProperty('_propsNormalized')) return;
const props = constructor.props;

@@ -83,15 +83,15 @@

const func = function func({ constructor }, name) {
const normalised = normalisePropertyDefinition(name, propertyDefinition);
const normalized = normalizePropertyDefinition(name, propertyDefinition);
// Ensure that we can cache properties. We have to do this so the _props object literal doesn't modify parent
// classes or share the instance anywhere where it's not intended to be shared explicitly in userland code.
if (!constructor.hasOwnProperty('_propsNormalised')) {
constructor._propsNormalised = {};
if (!constructor.hasOwnProperty('_propsNormalized')) {
constructor._propsNormalized = {};
}
// Cache the value so we can reference when syncing the attribute to the property.
constructor._propsNormalised[name] = normalised;
var _normalised$attribute = normalised.attribute;
const source = _normalised$attribute.source,
target = _normalised$attribute.target;
constructor._propsNormalized[name] = normalized;
var _normalized$attribute = normalized.attribute;
const source = _normalized$attribute.source,
target = _normalized$attribute.target;

@@ -111,7 +111,7 @@

const val = this._props[name];
return val == null ? normalised.default : val;
return val == null ? normalized.default : val;
},
set(val) {
const target = normalised.attribute.target,
serialize = normalised.serialize;
const target = normalized.attribute.target,
serialize = normalized.serialize;

@@ -126,3 +126,3 @@ if (target) {

}
this._props[name] = normalised.coerce(val);
this._props[name] = normalized.coerce(val);
this.triggerUpdate();

@@ -190,3 +190,3 @@ }

_attributeToPropertyMap = _constructor._attributeToPropertyMap,
_propsNormalised = _constructor._propsNormalised;
_propsNormalized = _constructor._propsNormalized;

@@ -200,3 +200,3 @@

if (propertyName) {
const propertyDefinition = _propsNormalised[propertyName];
const propertyDefinition = _propsNormalized[propertyName];
if (propertyDefinition) {

@@ -203,0 +203,0 @@ const defaultValue = propertyDefinition.default,

@@ -26,3 +26,3 @@ {

"types": "src/index.d.ts",
"version": "5.2.1"
"version": "5.2.2"
}
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