eve 0.5.3 → 0.5.4
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.
- package/component.json +1 -1
- package/eve.js +8 -12
- package/package.json +11 -2
package/component.json
CHANGED
package/eve.js
CHANGED
|
@@ -12,18 +12,17 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
// ┌────────────────────────────────────────────────────────────┐ \\
|
|
15
|
-
// │ Eve 0.5.
|
|
15
|
+
// │ Eve 0.5.4 - JavaScript Events Library │ \\
|
|
16
16
|
// ├────────────────────────────────────────────────────────────┤ \\
|
|
17
17
|
// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\
|
|
18
18
|
// └────────────────────────────────────────────────────────────┘ \\
|
|
19
19
|
|
|
20
20
|
(function (glob) {
|
|
21
|
-
var version = "0.5.
|
|
21
|
+
var version = "0.5.4",
|
|
22
22
|
has = "hasOwnProperty",
|
|
23
23
|
separator = /[\.\/]/,
|
|
24
24
|
comaseparator = /\s*,\s*/,
|
|
25
25
|
wildcard = "*",
|
|
26
|
-
fun = function () {},
|
|
27
26
|
numsort = function (a, b) {
|
|
28
27
|
return a - b;
|
|
29
28
|
},
|
|
@@ -49,7 +48,7 @@
|
|
|
49
48
|
Str = String,
|
|
50
49
|
isArray = Array.isArray || function (ar) {
|
|
51
50
|
return ar instanceof Array || objtos.call(ar) == "[object Array]";
|
|
52
|
-
}
|
|
51
|
+
},
|
|
53
52
|
/*\
|
|
54
53
|
* eve
|
|
55
54
|
[ method ]
|
|
@@ -63,18 +62,15 @@
|
|
|
63
62
|
= (object) array of returned values from the listeners. Array has two methods `.firstDefined()` and `.lastDefined()` to get first or last not `undefined` value.
|
|
64
63
|
\*/
|
|
65
64
|
eve = function (name, scope) {
|
|
66
|
-
var
|
|
67
|
-
oldstop = stop,
|
|
65
|
+
var oldstop = stop,
|
|
68
66
|
args = Array.prototype.slice.call(arguments, 2),
|
|
69
67
|
listeners = eve.listeners(name),
|
|
70
68
|
z = 0,
|
|
71
|
-
f = false,
|
|
72
69
|
l,
|
|
73
70
|
indexed = [],
|
|
74
71
|
queue = {},
|
|
75
72
|
out = [],
|
|
76
|
-
ce = current_event
|
|
77
|
-
errors = [];
|
|
73
|
+
ce = current_event;
|
|
78
74
|
out.firstDefined = firstDefined;
|
|
79
75
|
out.lastDefined = lastDefined;
|
|
80
76
|
current_event = name;
|
|
@@ -124,8 +120,8 @@
|
|
|
124
120
|
current_event = ce;
|
|
125
121
|
return out;
|
|
126
122
|
};
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
// Undocumented. Debug only.
|
|
124
|
+
eve._events = events;
|
|
129
125
|
/*\
|
|
130
126
|
* eve.listeners
|
|
131
127
|
[ method ]
|
|
@@ -435,5 +431,5 @@
|
|
|
435
431
|
return "You are running Eve " + version;
|
|
436
432
|
};
|
|
437
433
|
glob.eve = eve;
|
|
438
|
-
typeof module != "undefined" && module.exports ? module.exports = eve : typeof define === "function" && define.amd ? define("eve", [], function() { return eve; }) : glob.eve = eve;
|
|
434
|
+
typeof module != "undefined" && module.exports ? module.exports = eve : typeof define === "function" && define.amd ? define("eve", [], function () { return eve; }) : glob.eve = eve;
|
|
439
435
|
})(typeof window != "undefined" ? window : this);
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"description" : "Simple custom events",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
|
-
"version" : "0.5.
|
|
11
|
+
"version" : "0.5.4",
|
|
12
12
|
|
|
13
13
|
"main" : "./eve.js",
|
|
14
14
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
|
|
22
22
|
"scripts": {
|
|
23
|
-
"test": "
|
|
23
|
+
"test": "eslint eve.js",
|
|
24
24
|
"build": "node node_modules/dr.js/dr dr.json"
|
|
25
25
|
},
|
|
26
26
|
|
|
@@ -54,6 +54,15 @@
|
|
|
54
54
|
"new-cap": 0,
|
|
55
55
|
"no-unused-expressions": 0,
|
|
56
56
|
"no-mixed-requires": 0,
|
|
57
|
+
"indent": ["error", 4, { "SwitchCase": 1, "VariableDeclarator": 1 }],
|
|
58
|
+
"no-multi-spaces": [0, {
|
|
59
|
+
"exceptions": {
|
|
60
|
+
"VariableDeclarator": true
|
|
61
|
+
}
|
|
62
|
+
}],
|
|
63
|
+
"no-trailing-spaces": [2, { "skipBlankLines": false }],
|
|
64
|
+
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
|
|
65
|
+
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
|
|
57
66
|
"quotes": [
|
|
58
67
|
1,
|
|
59
68
|
"double",
|