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

mipp-ali

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mipp-ali - npm Package Compare versions

Comparing version 1.18.18 to 1.18.19

18

dist/Component/Base.js

@@ -80,6 +80,17 @@ "use strict";

MiniComponent.prototype.triggerEvent = function (eventName, data) {
var _a, _b, _c;
(_c = (_b = (_a = this) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b[eventName]) === null || _c === void 0 ? void 0 : _c.call(_b, {
var _a, _b, _c, _d;
var props = (_a = this) === null || _a === void 0 ? void 0 : _a.props;
var dataset = Object.keys(props || {})
.filter(function (property) { return property.startsWith("data-"); })
.map(function (property) { return property.replace(/^data\-/, ""); })
.reduce(function (prev, current) {
prev[current] = props["data-" + current];
return prev;
}, {});
(_d = (_c = (_b = this) === null || _b === void 0 ? void 0 : _b.props) === null || _c === void 0 ? void 0 : _c[eventName]) === null || _d === void 0 ? void 0 : _d.call(_c, {
type: eventName,
detail: data,
currentTarget: {
dataset: dataset || {},
},
});

@@ -122,4 +133,3 @@ };

if ((_a = _that.lifetimes) === null || _a === void 0 ? void 0 : _a[keyName]) {
_that.lifetimes[mappings === null || mappings === void 0 ? void 0 : mappings[keyName]] =
_that.lifetimes[keyName];
_that.lifetimes[mappings === null || mappings === void 0 ? void 0 : mappings[keyName]] = _that.lifetimes[keyName];
}

@@ -126,0 +136,0 @@ try {

{
"name": "mipp-ali",
"version": "1.18.18",
"version": "1.18.19",
"description": "小程序ts",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -27,5 +27,17 @@ import clone from "rfdc";

triggerEvent<IEventData = any>(eventName: string, data?: IEventData) {
const props = (this as any)?.props;
const dataset = Object.keys(props || {})
.filter((property) => property.startsWith("data-"))
.map((property) => property.replace(/^data\-/, ""))
.reduce((prev, current) => {
prev[current] = props[`data-${current}`];
return prev;
}, {});
(this as any)?.props?.[eventName]?.({
type: eventName,
detail: data,
currentTarget: {
dataset: dataset || {},
},
});

@@ -78,4 +90,3 @@ }

if (_that.lifetimes?.[keyName]) {
_that.lifetimes[mappings?.[keyName]] =
_that.lifetimes[keyName];
_that.lifetimes[mappings?.[keyName]] = _that.lifetimes[keyName];
}

@@ -82,0 +93,0 @@

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