snabberb 1.5.0 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70e69fb1b2b395905815542166eec657ba3783688bfb09920c8eabf98333cfc6
4
- data.tar.gz: dfd15e8472d743388a8506764b5a880369b1cdef9e871e1aa81aa90d24ffd4aa
3
+ metadata.gz: d8df3c5ddede482d10d0e60de8552fda717b3d716a9b044b22a92bf16f5810eb
4
+ data.tar.gz: aa9608215825700da0dfdabbf1a3a35aa4218465a15fb46684f78525f014c4ed
5
5
  SHA512:
6
- metadata.gz: ada4f4fd203e6b08231cd8a13246b768e661fd0c122873fbf2780b21acb19fc5cab634448182cc4baadddb92038297b8dc58d23d180b5480b9f6b1e6ce1f65f1
7
- data.tar.gz: a471da0912377d12da6ada8231214c408d26574297b0a15d1301095eadb70943984adec34d16867f6da4fcc6d1c486afb43bb6127cda49aabb946467d31900c1
6
+ metadata.gz: e8e105b3bf81c285dae88e1e8566a035880e83480623d521ed35370edc42102b7dfa213b2106e4f8abe88c2976584500dca41a47ace89b025aa2fb7a716a9e0f
7
+ data.tar.gz: 1cb1326f7f5e3d9a81a0ca39df672698c47aeff8ce36c60b7fb3dd49fe7c97744ee432f6e94a606f781671136d766096cb10a143de155fb539fe4856ac0de20c
@@ -1,17 +1,17 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- snabberb (1.3.1)
5
- opal (~> 1.1)
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.1.1)
11
+ opal (1.2.0)
12
12
  ast (>= 2.3.0)
13
13
  parser (~> 3.0)
14
- parser (3.0.1.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)
@@ -1,29 +1,29 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- snabberb (1.3.1)
5
- opal (~> 1.1)
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.8)
12
- execjs (2.7.0)
13
- libv8-node (15.14.0.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.1.1)
16
+ opal (1.2.0)
17
17
  ast (>= 2.3.0)
18
18
  parser (~> 3.0)
19
- opal-sprockets (1.0.0)
20
- opal (>= 1.0, < 1.2)
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.1.0)
23
+ parser (3.0.2.0)
24
24
  ast (~> 2.4.1)
25
25
  rack (2.2.3)
26
- roda (3.43.1)
26
+ roda (3.46.0)
27
27
  rack
28
28
  sprockets (4.0.2)
29
29
  concurrent-ruby (~> 1.0)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snabberb
4
- VERSION = '1.5.0'
4
+ VERSION = '1.5.4'
5
5
  end
@@ -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 (i = 0; i < hooks.length; ++i) {
266
- cbs[hooks[i]] = [];
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 (hook !== undefined) {
272
- cbs[hooks[i]].push(hook);
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.0
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-08-12 00:00:00.000000000 Z
11
+ date: 2021-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal