mclimate-payload-helper 1.0.17 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"mixin.d.ts","sourceRoot":"","sources":["../../src/utils/mixin.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,QAY7D"}
1
+ {"version":3,"file":"mixin.d.ts","sourceRoot":"","sources":["../../src/utils/mixin.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,QAQ7D"}
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- // NOTE: this is the "old way" of doing mixins, but it's still useful for some cases
3
- // ref for new way: https://www.typescriptlang.org/docs/handbook/mixins.html
4
2
  Object.defineProperty(exports, "__esModule", { value: true });
5
3
  exports.applyMixins = applyMixins;
4
+ // NOTE: this is the "old way" of doing mixins, but it's still useful for some cases
5
+ // ref for new way: https://www.typescriptlang.org/docs/handbook/mixins.html
6
6
  function applyMixins(derivedCtor, baseCtors) {
7
7
  baseCtors.forEach((baseCtor) => {
8
- Object.getOwnPropertyNames(baseCtor.prototype).forEach((name) => {
9
- if (name !== 'constructor') {
10
- Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name) || Object.create(null));
8
+ Object.getOwnPropertyNames(baseCtor).forEach((name) => {
9
+ if (name !== 'prototype' && name !== 'name' && name !== 'constructor') {
10
+ Object.defineProperty(derivedCtor, name, Object.getOwnPropertyDescriptor(baseCtor, name) || Object.create(null));
11
11
  }
12
12
  });
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"file":"mixin.js","sourceRoot":"","sources":["../../src/utils/mixin.ts"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,4EAA4E;;AAE5E,kCAYC;AAZD,SAAgB,WAAW,CAAC,WAAgB,EAAE,SAAgB;IAC7D,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC9B,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC/D,IAAI,IAAI,KAAK,aAAa,EAAE,CAAC;gBAC5B,MAAM,CAAC,cAAc,CACpB,WAAW,CAAC,SAAS,EACrB,IAAI,EACJ,MAAM,CAAC,wBAAwB,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAChF,CAAA;YACF,CAAC;QACF,CAAC,CAAC,CAAA;IACH,CAAC,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"mixin.js","sourceRoot":"","sources":["../../src/utils/mixin.ts"],"names":[],"mappings":";;AAEA,kCAQC;AAVD,oFAAoF;AACpF,4EAA4E;AAC5E,SAAgB,WAAW,CAAC,WAAgB,EAAE,SAAgB;IAC7D,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC9B,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrD,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,aAAa,EAAE,CAAC;gBACvE,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,wBAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;YACjH,CAAC;QACF,CAAC,CAAC,CAAA;IACH,CAAC,CAAC,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mclimate-payload-helper",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "Mclimate payload helper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,15 +1,10 @@
1
1
  // NOTE: this is the "old way" of doing mixins, but it's still useful for some cases
2
2
  // ref for new way: https://www.typescriptlang.org/docs/handbook/mixins.html
3
-
4
3
  export function applyMixins(derivedCtor: any, baseCtors: any[]) {
5
4
  baseCtors.forEach((baseCtor) => {
6
- Object.getOwnPropertyNames(baseCtor.prototype).forEach((name) => {
7
- if (name !== 'constructor') {
8
- Object.defineProperty(
9
- derivedCtor.prototype,
10
- name,
11
- Object.getOwnPropertyDescriptor(baseCtor.prototype, name) || Object.create(null),
12
- )
5
+ Object.getOwnPropertyNames(baseCtor).forEach((name) => {
6
+ if (name !== 'prototype' && name !== 'name' && name !== 'constructor') {
7
+ Object.defineProperty(derivedCtor, name, Object.getOwnPropertyDescriptor(baseCtor, name) || Object.create(null))
13
8
  }
14
9
  })
15
10
  })