snabberb 1.5.0 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/rack/Gemfile.lock +4 -4
- data/examples/roda/Gemfile.lock +10 -10
- data/lib/snabberb/version.rb +1 -1
- data/opal/vendor/snabbdom.js +8 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8df3c5ddede482d10d0e60de8552fda717b3d716a9b044b22a92bf16f5810eb
|
4
|
+
data.tar.gz: aa9608215825700da0dfdabbf1a3a35aa4218465a15fb46684f78525f014c4ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8e105b3bf81c285dae88e1e8566a035880e83480623d521ed35370edc42102b7dfa213b2106e4f8abe88c2976584500dca41a47ace89b025aa2fb7a716a9e0f
|
7
|
+
data.tar.gz: 1cb1326f7f5e3d9a81a0ca39df672698c47aeff8ce36c60b7fb3dd49fe7c97744ee432f6e94a606f781671136d766096cb10a143de155fb539fe4856ac0de20c
|
data/examples/rack/Gemfile.lock
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../..
|
3
3
|
specs:
|
4
|
-
snabberb (1.
|
5
|
-
opal (
|
4
|
+
snabberb (1.5.1)
|
5
|
+
opal (>= 1.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
ast (2.4.2)
|
11
|
-
opal (1.
|
11
|
+
opal (1.2.0)
|
12
12
|
ast (>= 2.3.0)
|
13
13
|
parser (~> 3.0)
|
14
|
-
parser (3.0.
|
14
|
+
parser (3.0.2.0)
|
15
15
|
ast (~> 2.4.1)
|
16
16
|
rack (2.2.3)
|
17
17
|
webrick (1.7.0)
|
data/examples/roda/Gemfile.lock
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../..
|
3
3
|
specs:
|
4
|
-
snabberb (1.
|
5
|
-
opal (
|
4
|
+
snabberb (1.5.1)
|
5
|
+
opal (>= 1.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
ast (2.4.2)
|
11
|
-
concurrent-ruby (1.1.
|
12
|
-
execjs (2.
|
13
|
-
libv8-node (15.14.0.
|
11
|
+
concurrent-ruby (1.1.9)
|
12
|
+
execjs (2.8.1)
|
13
|
+
libv8-node (15.14.0.1)
|
14
14
|
mini_racer (0.4.0)
|
15
15
|
libv8-node (~> 15.14.0.0)
|
16
|
-
opal (1.
|
16
|
+
opal (1.2.0)
|
17
17
|
ast (>= 2.3.0)
|
18
18
|
parser (~> 3.0)
|
19
|
-
opal-sprockets (1.0.
|
20
|
-
opal (>= 1.0, <
|
19
|
+
opal-sprockets (1.0.1)
|
20
|
+
opal (>= 1.0, < 2.0)
|
21
21
|
sprockets (~> 4.0)
|
22
22
|
tilt (>= 1.4)
|
23
|
-
parser (3.0.
|
23
|
+
parser (3.0.2.0)
|
24
24
|
ast (~> 2.4.1)
|
25
25
|
rack (2.2.3)
|
26
|
-
roda (3.
|
26
|
+
roda (3.46.0)
|
27
27
|
rack
|
28
28
|
sprockets (4.0.2)
|
29
29
|
concurrent-ruby (~> 1.0)
|
data/lib/snabberb/version.rb
CHANGED
data/opal/vendor/snabbdom.js
CHANGED
@@ -74,7 +74,7 @@ function h(sel, b, c) {
|
|
74
74
|
if (is.array(c)) {
|
75
75
|
children = c;
|
76
76
|
} else if (is.primitive(c)) {
|
77
|
-
text = c;
|
77
|
+
text = c.toString();
|
78
78
|
} else if (c && c.sel) {
|
79
79
|
children = [c];
|
80
80
|
}
|
@@ -82,7 +82,7 @@ function h(sel, b, c) {
|
|
82
82
|
if (is.array(b)) {
|
83
83
|
children = b;
|
84
84
|
} else if (is.primitive(b)) {
|
85
|
-
text = b;
|
85
|
+
text = b.toString();
|
86
86
|
} else if (b && b.sel) {
|
87
87
|
children = [b];
|
88
88
|
} else {
|
@@ -250,8 +250,6 @@ function createKeyToOldIdx(children, beginIdx, endIdx) {
|
|
250
250
|
const hooks = ["create", "update", "remove", "destroy", "pre", "post"];
|
251
251
|
|
252
252
|
function init(modules, domApi) {
|
253
|
-
let i;
|
254
|
-
let j;
|
255
253
|
const cbs = {
|
256
254
|
create: [],
|
257
255
|
update: [],
|
@@ -262,14 +260,12 @@ function init(modules, domApi) {
|
|
262
260
|
};
|
263
261
|
const api = domApi !== undefined ? domApi : _htmldomapi.htmlDomApi;
|
264
262
|
|
265
|
-
for (
|
266
|
-
|
267
|
-
|
268
|
-
for (j = 0; j < modules.length; ++j) {
|
269
|
-
const hook = modules[j][hooks[i]];
|
263
|
+
for (const hook of hooks) {
|
264
|
+
for (const module of modules) {
|
265
|
+
const currentHook = module[hook];
|
270
266
|
|
271
|
-
if (
|
272
|
-
cbs[
|
267
|
+
if (currentHook !== undefined) {
|
268
|
+
cbs[hook].push(currentHook);
|
273
269
|
}
|
274
270
|
}
|
275
271
|
}
|
@@ -582,7 +578,7 @@ const array = Array.isArray;
|
|
582
578
|
exports.array = array;
|
583
579
|
|
584
580
|
function primitive(s) {
|
585
|
-
return typeof s === "string" || typeof s === "number";
|
581
|
+
return typeof s === "string" || typeof s === "number" || s instanceof String || s instanceof Number;
|
586
582
|
}
|
587
583
|
|
588
584
|
},{}],6:[function(require,module,exports){
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snabberb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Mao
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|