@@ -2,9 +2,7 @@ var hyperHTML = (function (document) {
2
2
'use strict' ;
3
3
4
4
/*! (c) Andrea Giammarchi - ISC */
5
- var self = null ||
6
- /* istanbul ignore next */
7
- { } ;
5
+ var self = { } ;
8
6
9
7
try {
10
8
self . WeakMap = WeakMap ;
@@ -55,9 +53,7 @@ var hyperHTML = (function (document) {
55
53
var WeakMap$1 = self . WeakMap ;
56
54
57
55
/*! (c) Andrea Giammarchi - ISC */
58
- var self$1 = null ||
59
- /* istanbul ignore next */
60
- { } ;
56
+ var self$1 = { } ;
61
57
62
58
try {
63
59
self$1 . WeakSet = WeakSet ;
@@ -483,9 +479,7 @@ var hyperHTML = (function (document) {
483
479
484
480
485
481
/*! (c) Andrea Giammarchi - ISC */
486
- var self$2 = null ||
487
- /* istanbul ignore next */
488
- { } ;
482
+ var self$2 = { } ;
489
483
self$2 . CustomEvent = typeof CustomEvent === 'function' ? CustomEvent : function ( __p__ ) {
490
484
CustomEvent [ __p__ ] = new CustomEvent ( '' ) . constructor [ __p__ ] ;
491
485
return CustomEvent ;
@@ -500,9 +494,7 @@ var hyperHTML = (function (document) {
500
494
var CustomEvent$1 = self$2 . CustomEvent ;
501
495
502
496
/*! (c) Andrea Giammarchi - ISC */
503
- var self$3 = null ||
504
- /* istanbul ignore next */
505
- { } ;
497
+ var self$3 = { } ;
506
498
507
499
try {
508
500
self$3 . Map = Map ;
@@ -751,8 +743,13 @@ var hyperHTML = (function (document) {
751
743
}
752
744
} ;
753
745
754
- var isArray = Array . isArray || function ( toString ) {
746
+ var isArray = Array . isArray ||
747
+ /* istanbul ignore next */
748
+ function ( toString ) {
749
+ /* istanbul ignore next */
755
750
var $ = toString . call ( [ ] ) ;
751
+ /* istanbul ignore next */
752
+
756
753
return function isArray ( object ) {
757
754
return toString . call ( object ) === $ ;
758
755
} ;
@@ -916,21 +913,29 @@ var hyperHTML = (function (document) {
916
913
var fragment = document . createDocumentFragment ( ) ;
917
914
fragment [ appendChild ] ( document [ createTextNode ] ( 'g' ) ) ;
918
915
fragment [ appendChild ] ( document [ createTextNode ] ( '' ) ) ;
916
+ /* istanbul ignore next */
917
+
919
918
var content = _native ? document [ importNode ] ( fragment , true ) : fragment [ cloneNode ] ( true ) ;
920
919
return content . childNodes . length < 2 ? function importNode ( node , deep ) {
921
920
var clone = node [ cloneNode ] ( ) ;
922
921
923
- for ( var childNodes = node . childNodes || [ ] , length = childNodes . length , i = 0 ; deep && i < length ; i ++ ) {
922
+ for ( var
923
+ /* istanbul ignore next */
924
+ childNodes = node . childNodes || [ ] , length = childNodes . length , i = 0 ; deep && i < length ; i ++ ) {
924
925
clone [ appendChild ] ( importNode ( childNodes [ i ] , deep ) ) ;
925
926
}
926
927
927
928
return clone ;
928
- } : _native ? document [ importNode ] : function ( node , deep ) {
929
+ } :
930
+ /* istanbul ignore next */
931
+ _native ? document [ importNode ] : function ( node , deep ) {
929
932
return node [ cloneNode ] ( ! ! deep ) ;
930
933
} ;
931
934
} ( document , 'appendChild' , 'cloneNode' , 'createTextNode' , 'importNode' ) ;
932
935
933
- var trim = '' . trim || function ( ) {
936
+ var trim = '' . trim ||
937
+ /* istanbul ignore next */
938
+ function ( ) {
934
939
return String ( this ) . replace ( / ^ \s + | \s + / g, '' ) ;
935
940
} ;
936
941
@@ -1835,6 +1840,15 @@ var hyperHTML = (function (document) {
1835
1840
1836
1841
return args ;
1837
1842
}
1843
+ /**
1844
+ * best benchmark goes here
1845
+ * https://jsperf.com/tta-bench
1846
+ * I should probably have an @ungap/template-literal-es too
1847
+ export default (...args) => {
1848
+ args[0] = unique(args[0]);
1849
+ return args;
1850
+ };
1851
+ */
1838
1852
1839
1853
var wires = new WeakMap$1 ( ) ; // A wire is a callback used as tag function
1840
1854
// to lazily relate a generic object to a template literal.
0 commit comments