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

menhera

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

menhera - npm Package Compare versions

Comparing version 0.1.9 to 0.2.0

dist/plugins.js

34

dist/index.js

@@ -17,4 +17,2 @@ "use strict";

function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

@@ -25,3 +23,3 @@

var initConfig = {
lifeCycle: ["awake", "start"]
lifeCycle: ["_awake", "start"]
};

@@ -56,5 +54,2 @@

var _lifeCycle = _toArray(lifeCycle),
awake = _lifeCycle[0],
lifeCycles = _lifeCycle.slice(1);

@@ -73,14 +68,9 @@ components.forEach(function () {

_context.t0 = cp[awake];
lifeCycle.forEach(function (key) {
if (key.startsWith("_")) {
cp[key] && cp[key]();
}
});
if (!_context.t0) {
_context.next = 7;
break;
}
_context.next = 7;
return cp[awake]();
case 7:
_context.next = 9;
_context.next = 6;
return Object.keys(cp).forEach(function (prop) {

@@ -97,9 +87,11 @@ var hook = _[prop];

case 9:
case 6:
lifeCycles.forEach(function (key) {
cp[key] && cp[key]();
lifeCycle.forEach(function (key) {
if (!key.startsWith("_")) {
cp[key] && cp[key]();
}
});
case 10:
case 7:
case "end":

@@ -106,0 +98,0 @@ return _context.stop();

{
"name": "menhera",
"version": "0.1.9",
"version": "0.2.0",
"main": "dist",

@@ -5,0 +5,0 @@ "files": [

@@ -15,3 +15,3 @@ # Menhera

name: "menhera-observer",
awake() {
_awake() {
const { config: { observable = {} } } = _;

@@ -47,3 +47,3 @@ _.Observer = { Event: new EventEmitter() };

name: "menhera-event",
awake() {
_awake() {
_.Event = new EventEmitter();

@@ -67,3 +67,3 @@ _.onEvent = ({ name, event }) => {

name: "test",
awake() {
_awake() {
console.log("test0");

@@ -101,2 +101,3 @@ },

const _ = new Menhera({
lifeCycle: ["_awake", "start"],
components: [Observer, Event, Test],

@@ -103,0 +104,0 @@ observable: { test3: "test3" }

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