avances en plantillas

This commit is contained in:
JACS 2026-05-01 18:15:40 -05:00
parent 0f84beacf1
commit da0530d79b
2062 changed files with 598814 additions and 22 deletions

View file

@ -0,0 +1,864 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1610902297336" clover="3.2.0">
<project timestamp="1610902297336" name="All files">
<metrics statements="795" coveredstatements="742" conditionals="450" coveredconditionals="364" methods="118" coveredmethods="113" elements="1363" coveredelements="1219" complexity="0" loc="795" ncloc="795" packages="2" files="19" classes="19"/>
<package name="src">
<metrics statements="590" coveredstatements="577" conditionals="307" coveredconditionals="280" methods="92" coveredmethods="90"/>
<file name="add-async.js" path="/Users/javve/git/list.js/src/add-async.js">
<metrics statements="11" coveredstatements="11" conditionals="4" coveredconditionals="4" methods="3" coveredmethods="3"/>
<line num="1" count="17" type="stmt"/>
<line num="2" count="91" type="stmt"/>
<line num="3" count="3" type="stmt"/>
<line num="4" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="5" count="3" type="stmt"/>
<line num="6" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="7" count="1" type="stmt"/>
<line num="8" count="1" type="stmt"/>
<line num="11" count="2" type="stmt"/>
<line num="12" count="2" type="stmt"/>
<line num="15" count="91" type="stmt"/>
</file>
<file name="filter.js" path="/Users/javve/git/list.js/src/filter.js">
<metrics statements="19" coveredstatements="19" conditionals="8" coveredconditionals="8" methods="2" coveredmethods="2"/>
<line num="1" count="17" type="stmt"/>
<line num="3" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="4" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="6" count="90" type="stmt"/>
<line num="7" count="69" type="stmt"/>
<line num="8" count="69" type="stmt"/>
<line num="9" count="69" type="stmt"/>
<line num="10" count="69" type="cond" truecount="2" falsecount="0"/>
<line num="11" count="47" type="stmt"/>
<line num="13" count="22" type="stmt"/>
<line num="14" count="22" type="stmt"/>
<line num="15" count="22" type="stmt"/>
<line num="16" count="122" type="stmt"/>
<line num="17" count="122" type="cond" truecount="2" falsecount="0"/>
<line num="18" count="70" type="stmt"/>
<line num="20" count="52" type="stmt"/>
<line num="24" count="69" type="stmt"/>
<line num="25" count="69" type="stmt"/>
<line num="26" count="69" type="stmt"/>
</file>
<file name="fuzzy-search.js" path="/Users/javve/git/list.js/src/fuzzy-search.js">
<metrics statements="32" coveredstatements="32" conditionals="14" coveredconditionals="11" methods="6" coveredmethods="6"/>
<line num="1" count="17" type="stmt"/>
<line num="2" count="17" type="stmt"/>
<line num="3" count="17" type="stmt"/>
<line num="4" count="17" type="stmt"/>
<line num="5" count="17" type="stmt"/>
<line num="6" count="17" type="stmt"/>
<line num="8" count="17" type="stmt"/>
<line num="9" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="11" count="90" type="stmt"/>
<line num="22" count="90" type="stmt"/>
<line num="25" count="5" type="cond" truecount="1" falsecount="1"/>
<line num="27" count="5" type="stmt"/>
<line num="28" count="50" type="stmt"/>
<line num="32" count="50" type="stmt"/>
<line num="33" count="50" type="stmt"/>
<line num="34" count="60" type="stmt"/>
<line num="35" count="60" type="stmt"/>
<line num="36" count="60" type="cond" truecount="2" falsecount="0"/>
<line num="37" count="11" type="stmt"/>
<line num="40" count="60" type="cond" truecount="2" falsecount="0"/>
<line num="41" count="49" type="stmt"/>
<line num="44" count="50" type="stmt"/>
<line num="47" count="60" type="cond" truecount="1" falsecount="1"/>
<line num="48" count="60" type="stmt"/>
<line num="50" count="60" type="cond" truecount="2" falsecount="0"/>
<line num="51" count="11" type="stmt"/>
<line num="54" count="49" type="stmt"/>
<line num="58" count="90" type="stmt"/>
<line num="62" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="63" count="2" type="stmt"/>
<line num="67" count="90" type="stmt"/>
<line num="68" count="3" type="stmt"/>
</file>
<file name="index.js" path="/Users/javve/git/list.js/src/index.js">
<metrics statements="160" coveredstatements="158" conditionals="37" coveredconditionals="35" methods="19" coveredmethods="19"/>
<line num="1" count="17" type="stmt"/>
<line num="2" count="17" type="stmt"/>
<line num="3" count="17" type="stmt"/>
<line num="4" count="17" type="stmt"/>
<line num="5" count="17" type="stmt"/>
<line num="6" count="17" type="stmt"/>
<line num="7" count="17" type="stmt"/>
<line num="8" count="17" type="stmt"/>
<line num="9" count="17" type="stmt"/>
<line num="11" count="17" type="stmt"/>
<line num="12" count="91" type="stmt"/>
<line num="14" count="91" type="stmt"/>
<line num="15" count="91" type="stmt"/>
<line num="16" count="91" type="stmt"/>
<line num="18" count="91" type="stmt"/>
<line num="20" count="91" type="stmt"/>
<line num="21" count="91" type="stmt"/>
<line num="22" count="91" type="stmt"/>
<line num="23" count="91" type="stmt"/>
<line num="24" count="91" type="stmt"/>
<line num="25" count="91" type="stmt"/>
<line num="26" count="91" type="stmt"/>
<line num="27" count="91" type="stmt"/>
<line num="28" count="91" type="stmt"/>
<line num="29" count="91" type="stmt"/>
<line num="30" count="91" type="stmt"/>
<line num="31" count="91" type="stmt"/>
<line num="32" count="91" type="stmt"/>
<line num="33" count="91" type="stmt"/>
<line num="34" count="91" type="stmt"/>
<line num="46" count="91" type="stmt"/>
<line num="48" count="91" type="cond" truecount="2" falsecount="0"/>
<line num="49" count="91" type="cond" truecount="1" falsecount="1"/>
<line num="50" count="0" type="stmt"/>
<line num="52" count="91" type="stmt"/>
<line num="54" count="91" type="stmt"/>
<line num="55" count="91" type="stmt"/>
<line num="56" count="90" type="stmt"/>
<line num="57" count="90" type="stmt"/>
<line num="58" count="90" type="stmt"/>
<line num="59" count="90" type="stmt"/>
<line num="61" count="90" type="stmt"/>
<line num="62" count="90" type="stmt"/>
<line num="63" count="90" type="stmt"/>
<line num="65" count="90" type="stmt"/>
<line num="68" count="90" type="stmt"/>
<line num="69" count="720" type="cond" truecount="4" falsecount="0"/>
<line num="70" count="1" type="stmt"/>
<line num="75" count="90" type="stmt"/>
<line num="76" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="77" count="71" type="stmt"/>
<line num="81" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="82" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="83" count="1" type="stmt"/>
<line num="85" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="86" count="3" type="stmt"/>
<line num="88" count="4" type="stmt"/>
<line num="89" count="4" type="stmt"/>
<line num="98" count="91" type="stmt"/>
<line num="99" count="1" type="stmt"/>
<line num="100" count="1" type="stmt"/>
<line num="101" count="1" type="stmt"/>
<line num="102" count="1" type="stmt"/>
<line num="103" count="1" type="stmt"/>
<line num="104" count="1" type="stmt"/>
<line num="107" count="91" type="stmt"/>
<line num="108" count="2" type="stmt"/>
<line num="109" count="2" type="stmt"/>
<line num="110" count="8" type="stmt"/>
<line num="112" count="2" type="stmt"/>
<line num="118" count="91" type="stmt"/>
<line num="119" count="238" type="cond" truecount="1" falsecount="1"/>
<line num="120" count="0" type="stmt"/>
<line num="122" count="238" type="cond" truecount="2" falsecount="0"/>
<line num="123" count="2" type="stmt"/>
<line num="124" count="2" type="stmt"/>
<line num="126" count="236" type="stmt"/>
<line num="127" count="236" type="stmt"/>
<line num="128" count="236" type="cond" truecount="2" falsecount="0"/>
<line num="129" count="161" type="stmt"/>
<line num="131" count="236" type="stmt"/>
<line num="132" count="717" type="stmt"/>
<line num="133" count="717" type="cond" truecount="2" falsecount="0"/>
<line num="134" count="717" type="stmt"/>
<line num="135" count="717" type="stmt"/>
<line num="136" count="717" type="stmt"/>
<line num="138" count="236" type="stmt"/>
<line num="139" count="236" type="stmt"/>
<line num="142" count="91" type="stmt"/>
<line num="143" count="79" type="stmt"/>
<line num="144" count="79" type="stmt"/>
<line num="145" count="79" type="stmt"/>
<line num="146" count="79" type="stmt"/>
<line num="153" count="91" type="stmt"/>
<line num="154" count="5" type="stmt"/>
<line num="155" count="5" type="stmt"/>
<line num="156" count="20" type="cond" truecount="2" falsecount="0"/>
<line num="157" count="10" type="stmt"/>
<line num="158" count="10" type="stmt"/>
<line num="159" count="10" type="stmt"/>
<line num="160" count="10" type="stmt"/>
<line num="161" count="10" type="stmt"/>
<line num="164" count="5" type="stmt"/>
<line num="165" count="5" type="stmt"/>
<line num="171" count="91" type="stmt"/>
<line num="172" count="251" type="stmt"/>
<line num="173" count="251" type="stmt"/>
<line num="174" count="1482" type="stmt"/>
<line num="175" count="1482" type="cond" truecount="2" falsecount="0"/>
<line num="176" count="251" type="stmt"/>
<line num="179" count="251" type="stmt"/>
<line num="185" count="91" type="stmt"/>
<line num="186" count="139" type="stmt"/>
<line num="192" count="91" type="stmt"/>
<line num="193" count="37" type="stmt"/>
<line num="194" count="37" type="stmt"/>
<line num="195" count="37" type="stmt"/>
<line num="198" count="91" type="stmt"/>
<line num="199" count="213" type="stmt"/>
<line num="200" count="213" type="stmt"/>
<line num="203" count="91" type="stmt"/>
<line num="204" count="3" type="stmt"/>
<line num="205" count="3" type="stmt"/>
<line num="206" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="207" count="2" type="stmt"/>
<line num="209" count="3" type="stmt"/>
<line num="212" count="91" type="stmt"/>
<line num="213" count="937" type="stmt"/>
<line num="214" count="937" type="stmt"/>
<line num="215" count="198" type="stmt"/>
<line num="217" count="937" type="stmt"/>
<line num="220" count="91" type="stmt"/>
<line num="222" count="69" type="stmt"/>
<line num="223" count="69" type="stmt"/>
<line num="224" count="69" type="stmt"/>
<line num="225" count="329" type="stmt"/>
<line num="227" count="69" type="stmt"/>
<line num="230" count="25" type="stmt"/>
<line num="231" count="25" type="stmt"/>
<line num="232" count="25" type="stmt"/>
<line num="233" count="75" type="stmt"/>
<line num="235" count="25" type="stmt"/>
<line num="239" count="91" type="stmt"/>
<line num="240" count="587" type="stmt"/>
<line num="241" count="587" type="stmt"/>
<line num="243" count="587" type="stmt"/>
<line num="244" count="587" type="stmt"/>
<line num="245" count="587" type="stmt"/>
<line num="246" count="587" type="stmt"/>
<line num="247" count="3379" type="cond" truecount="5" falsecount="0"/>
<line num="248" count="2462" type="stmt"/>
<line num="249" count="2462" type="stmt"/>
<line num="250" count="2462" type="stmt"/>
<line num="251" count="917" type="cond" truecount="2" falsecount="0"/>
<line num="252" count="597" type="stmt"/>
<line num="253" count="597" type="stmt"/>
<line num="255" count="320" type="stmt"/>
<line num="258" count="587" type="stmt"/>
<line num="259" count="587" type="stmt"/>
<line num="262" count="91" type="stmt"/>
</file>
<file name="item.js" path="/Users/javve/git/list.js/src/item.js">
<metrics statements="30" coveredstatements="30" conditionals="24" coveredconditionals="24" methods="8" coveredmethods="8"/>
<line num="1" count="17" type="stmt"/>
<line num="2" count="182" type="stmt"/>
<line num="3" count="907" type="stmt"/>
<line num="5" count="907" type="stmt"/>
<line num="7" count="907" type="stmt"/>
<line num="8" count="907" type="stmt"/>
<line num="10" count="907" type="stmt"/>
<line num="11" count="907" type="cond" truecount="2" falsecount="0"/>
<line num="12" count="717" type="cond" truecount="2" falsecount="0"/>
<line num="13" count="60" type="stmt"/>
<line num="15" count="657" type="stmt"/>
<line num="18" count="190" type="stmt"/>
<line num="19" count="190" type="stmt"/>
<line num="20" count="190" type="stmt"/>
<line num="24" count="907" type="stmt"/>
<line num="25" count="6167" type="cond" truecount="2" falsecount="0"/>
<line num="26" count="1015" type="stmt"/>
<line num="27" count="1594" type="stmt"/>
<line num="29" count="1015" type="cond" truecount="2" falsecount="0"/>
<line num="30" count="955" type="stmt"/>
<line num="33" count="5152" type="stmt"/>
<line num="37" count="907" type="stmt"/>
<line num="38" count="2463" type="stmt"/>
<line num="41" count="907" type="stmt"/>
<line num="42" count="919" type="stmt"/>
<line num="45" count="907" type="stmt"/>
<line num="46" count="4350" type="stmt"/>
<line num="54" count="907" type="stmt"/>
<line num="55" count="92" type="cond" truecount="4" falsecount="0"/>
<line num="58" count="907" type="stmt"/>
</file>
<file name="pagination.js" path="/Users/javve/git/list.js/src/pagination.js">
<metrics statements="54" coveredstatements="49" conditionals="43" coveredconditionals="39" methods="12" coveredmethods="11"/>
<line num="1" count="17" type="stmt"/>
<line num="2" count="17" type="stmt"/>
<line num="3" count="17" type="stmt"/>
<line num="5" count="17" type="stmt"/>
<line num="6" count="91" type="stmt"/>
<line num="8" count="91" type="stmt"/>
<line num="9" count="26" type="cond" truecount="2" falsecount="0"/>
<line num="10" count="2" type="stmt"/>
<line num="11" count="2" type="stmt"/>
<line num="12" count="2" type="stmt"/>
<line num="13" count="24" type="cond" truecount="2" falsecount="0"/>
<line num="14" count="2" type="stmt"/>
<line num="18" count="24" type="stmt"/>
<line num="19" count="24" type="stmt"/>
<line num="20" count="24" type="stmt"/>
<line num="21" count="24" type="stmt"/>
<line num="22" count="24" type="stmt"/>
<line num="23" count="24" type="cond" truecount="2" falsecount="0"/>
<line num="24" count="24" type="cond" truecount="3" falsecount="0"/>
<line num="25" count="24" type="cond" truecount="3" falsecount="0"/>
<line num="27" count="24" type="stmt"/>
<line num="28" count="24" type="stmt"/>
<line num="29" count="24" type="stmt"/>
<line num="30" count="234" type="cond" truecount="2" falsecount="0"/>
<line num="34" count="234" type="cond" truecount="2" falsecount="0"/>
<line num="35" count="95" type="stmt"/>
<line num="39" count="95" type="cond" truecount="2" falsecount="0"/>
<line num="40" count="24" type="stmt"/>
<line num="42" count="95" type="stmt"/>
<line num="43" count="95" type="stmt"/>
<line num="44" count="139" type="cond" truecount="2" falsecount="0"/>
<line num="45" count="30" type="stmt"/>
<line num="49" count="30" type="stmt"/>
<line num="54" count="91" type="stmt"/>
<line num="56" count="234" type="cond" truecount="3" falsecount="0"/>
<line num="59" count="234" type="stmt"/>
<line num="62" count="249" type="stmt"/>
<line num="65" count="239" type="cond" truecount="2" falsecount="0"/>
<line num="68" count="139" type="stmt"/>
<line num="74" count="139" type="cond" truecount="3" falsecount="0"/>
<line num="77" count="124" type="cond" truecount="2" falsecount="0"/>
<line num="78" count="39" type="stmt"/>
<line num="80" count="85" type="cond" truecount="3" falsecount="0"/>
<line num="85" count="91" type="stmt"/>
<line num="86" count="4" type="stmt"/>
<line num="94" count="4" type="stmt"/>
<line num="95" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="96" count="0" type="stmt"/>
<line num="97" count="0" type="stmt"/>
<line num="98" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="99" count="0" type="stmt"/>
<line num="103" count="4" type="stmt"/>
<line num="104" count="22" type="stmt"/>
<line num="106" count="4" type="stmt"/>
</file>
<file name="parse.js" path="/Users/javve/git/list.js/src/parse.js">
<metrics statements="27" coveredstatements="27" conditionals="8" coveredconditionals="8" methods="6" coveredmethods="6"/>
<line num="1" count="17" type="stmt"/>
<line num="2" count="91" type="stmt"/>
<line num="4" count="91" type="stmt"/>
<line num="5" count="91" type="stmt"/>
<line num="6" count="91" type="stmt"/>
<line num="7" count="91" type="stmt"/>
<line num="9" count="312" type="cond" truecount="2" falsecount="0"/>
<line num="10" count="190" type="stmt"/>
<line num="13" count="91" type="stmt"/>
<line num="16" count="91" type="stmt"/>
<line num="17" count="94" type="stmt"/>
<line num="18" count="190" type="stmt"/>
<line num="21" count="91" type="stmt"/>
<line num="22" count="4" type="stmt"/>
<line num="23" count="4" type="stmt"/>
<line num="24" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="25" count="3" type="stmt"/>
<line num="26" count="3" type="stmt"/>
<line num="29" count="1" type="stmt"/>
<line num="30" count="1" type="stmt"/>
<line num="34" count="91" type="cond" truecount="2" falsecount="0"/>
<line num="36" count="91" type="stmt"/>
<line num="37" count="91" type="stmt"/>
<line num="38" count="91" type="stmt"/>
<line num="40" count="91" type="cond" truecount="2" falsecount="0"/>
<line num="41" count="1" type="stmt"/>
<line num="43" count="90" type="stmt"/>
</file>
<file name="search.js" path="/Users/javve/git/list.js/src/search.js">
<metrics statements="77" coveredstatements="74" conditionals="49" coveredconditionals="40" methods="11" coveredmethods="10"/>
<line num="1" count="17" type="stmt"/>
<line num="4" count="90" type="stmt"/>
<line num="6" count="72" type="stmt"/>
<line num="7" count="72" type="stmt"/>
<line num="8" count="72" type="stmt"/>
<line num="11" count="72" type="cond" truecount="4" falsecount="0"/>
<line num="12" count="6" type="stmt"/>
<line num="13" count="66" type="cond" truecount="4" falsecount="0"/>
<line num="14" count="3" type="stmt"/>
<line num="15" count="3" type="stmt"/>
<line num="16" count="63" type="cond" truecount="2" falsecount="0"/>
<line num="17" count="4" type="stmt"/>
<line num="18" count="4" type="stmt"/>
<line num="20" count="59" type="stmt"/>
<line num="24" count="72" type="cond" truecount="1" falsecount="1"/>
<line num="25" count="72" type="cond" truecount="2" falsecount="0"/>
<line num="26" count="65" type="cond" truecount="2" falsecount="0"/>
<line num="30" count="72" type="stmt"/>
<line num="31" count="72" type="stmt"/>
<line num="32" count="72" type="stmt"/>
<line num="35" count="63" type="stmt"/>
<line num="36" count="63" type="stmt"/>
<line num="37" count="138" type="stmt"/>
<line num="39" count="63" type="stmt"/>
<line num="42" count="90" type="stmt"/>
<line num="46" count="40" type="stmt"/>
<line num="48" count="40" type="stmt"/>
<line num="49" count="40" type="stmt"/>
<line num="50" count="2" type="stmt"/>
<line num="51" count="2" type="stmt"/>
<line num="54" count="40" type="stmt"/>
<line num="55" count="40" type="cond" truecount="2" falsecount="0"/>
<line num="56" count="40" type="stmt"/>
<line num="57" count="222" type="stmt"/>
<line num="58" count="222" type="stmt"/>
<line num="59" count="222" type="cond" truecount="1" falsecount="1"/>
<line num="60" count="222" type="stmt"/>
<line num="61" count="233" type="stmt"/>
<line num="62" count="233" type="stmt"/>
<line num="63" count="377" type="stmt"/>
<line num="64" count="377" type="stmt"/>
<line num="65" count="377" type="cond" truecount="5" falsecount="0"/>
<line num="66" count="363" type="cond" truecount="2" falsecount="0"/>
<line num="67" count="363" type="cond" truecount="2" falsecount="0"/>
<line num="69" count="67" type="stmt"/>
<line num="70" count="67" type="stmt"/>
<line num="75" count="233" type="cond" truecount="2" falsecount="0"/>
<line num="77" count="222" type="stmt"/>
<line num="82" count="25" type="stmt"/>
<line num="83" count="25" type="stmt"/>
<line num="87" count="90" type="stmt"/>
<line num="88" count="72" type="stmt"/>
<line num="90" count="72" type="stmt"/>
<line num="91" count="72" type="stmt"/>
<line num="92" count="72" type="stmt"/>
<line num="93" count="72" type="stmt"/>
<line num="95" count="72" type="cond" truecount="2" falsecount="0"/>
<line num="96" count="25" type="stmt"/>
<line num="98" count="47" type="stmt"/>
<line num="99" count="47" type="cond" truecount="2" falsecount="0"/>
<line num="100" count="7" type="stmt"/>
<line num="102" count="40" type="stmt"/>
<line num="106" count="72" type="stmt"/>
<line num="107" count="72" type="stmt"/>
<line num="108" count="72" type="stmt"/>
<line num="111" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="112" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="114" count="90" type="stmt"/>
<line num="118" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="119" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="120" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="122" count="2" type="stmt"/>
<line num="128" count="90" type="stmt"/>
<line num="129" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="130" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="131" count="0" type="stmt"/>
<line num="135" count="90" type="stmt"/>
</file>
<file name="sort.js" path="/Users/javve/git/list.js/src/sort.js">
<metrics statements="61" coveredstatements="59" conditionals="47" coveredconditionals="45" methods="8" coveredmethods="8"/>
<line num="1" count="17" type="stmt"/>
<line num="2" count="90" type="stmt"/>
<line num="5" count="174" type="stmt"/>
<line num="6" count="39" type="stmt"/>
<line num="7" count="39" type="stmt"/>
<line num="11" count="10" type="stmt"/>
<line num="12" count="10" type="cond" truecount="4" falsecount="0"/>
<line num="13" count="5" type="stmt"/>
<line num="14" count="5" type="cond" truecount="2" falsecount="0"/>
<line num="15" count="1" type="stmt"/>
<line num="16" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="17" count="1" type="stmt"/>
<line num="19" count="3" type="stmt"/>
<line num="23" count="10" type="stmt"/>
<line num="24" count="10" type="cond" truecount="1" falsecount="1"/>
<line num="25" count="0" type="stmt"/>
<line num="27" count="10" type="stmt"/>
<line num="31" count="33" type="stmt"/>
<line num="32" count="33" type="stmt"/>
<line num="33" count="33" type="cond" truecount="1" falsecount="1"/>
<line num="34" count="0" type="stmt"/>
<line num="36" count="33" type="stmt"/>
<line num="37" count="33" type="cond" truecount="4" falsecount="0"/>
<line num="38" count="22" type="cond" truecount="2" falsecount="0"/>
<line num="39" count="11" type="stmt"/>
<line num="42" count="11" type="stmt"/>
<line num="48" count="90" type="stmt"/>
<line num="49" count="33" type="stmt"/>
<line num="50" count="33" type="stmt"/>
<line num="52" count="33" type="cond" truecount="3" falsecount="0"/>
<line num="54" count="33" type="cond" truecount="2" falsecount="0"/>
<line num="55" count="10" type="stmt"/>
<line num="56" count="10" type="stmt"/>
<line num="57" count="10" type="stmt"/>
<line num="59" count="23" type="cond" truecount="2" falsecount="0"/>
<line num="60" count="23" type="stmt"/>
<line num="61" count="23" type="cond" truecount="2" falsecount="0"/>
<line num="62" count="23" type="cond" truecount="2" falsecount="0"/>
<line num="65" count="33" type="stmt"/>
<line num="66" count="33" type="stmt"/>
<line num="70" count="33" type="cond" truecount="3" falsecount="0"/>
<line num="71" count="33" type="cond" truecount="2" falsecount="0"/>
<line num="74" count="33" type="cond" truecount="2" falsecount="0"/>
<line num="75" count="3" type="stmt"/>
<line num="76" count="32" type="stmt"/>
<line num="79" count="30" type="stmt"/>
<line num="80" count="191" type="stmt"/>
<line num="81" count="191" type="cond" truecount="3" falsecount="0"/>
<line num="82" count="191" type="cond" truecount="4" falsecount="0"/>
<line num="83" count="144" type="stmt"/>
<line num="85" count="191" type="stmt"/>
<line num="89" count="33" type="stmt"/>
<line num="90" count="33" type="stmt"/>
<line num="91" count="33" type="stmt"/>
<line num="95" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="96" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="98" count="90" type="stmt"/>
<line num="99" count="90" type="stmt"/>
<line num="100" count="90" type="stmt"/>
<line num="101" count="90" type="stmt"/>
<line num="103" count="90" type="stmt"/>
</file>
<file name="templater.js" path="/Users/javve/git/list.js/src/templater.js">
<metrics statements="119" coveredstatements="118" conditionals="73" coveredconditionals="66" methods="17" coveredmethods="17"/>
<line num="1" count="17" type="stmt"/>
<line num="3" count="91" type="stmt"/>
<line num="5" count="91" type="stmt"/>
<line num="8" count="91" type="cond" truecount="2" falsecount="0"/>
<line num="9" count="1" type="stmt"/>
<line num="10" count="3" type="stmt"/>
<line num="11" count="3" type="stmt"/>
<line num="13" count="1" type="stmt"/>
<line num="16" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="17" count="74" type="cond" truecount="2" falsecount="0"/>
<line num="18" count="1" type="stmt"/>
<line num="20" count="73" type="stmt"/>
<line num="25" count="16" type="stmt"/>
<line num="28" count="90" type="cond" truecount="2" falsecount="0"/>
<line num="29" count="1" type="stmt"/>
<line num="32" count="89" type="stmt"/>
<line num="34" count="89" type="stmt"/>
<line num="35" count="680" type="stmt"/>
<line num="39" count="91" type="stmt"/>
<line num="40" count="89" type="stmt"/>
<line num="41" count="89" type="stmt"/>
<line num="43" count="89" type="stmt"/>
<line num="44" count="159" type="stmt"/>
<line num="45" count="159" type="stmt"/>
<line num="46" count="159" type="cond" truecount="2" falsecount="0"/>
<line num="47" count="2" type="stmt"/>
<line num="48" count="2" type="stmt"/>
<line num="50" count="157" type="cond" truecount="4" falsecount="0"/>
<line num="51" count="8" type="stmt"/>
<line num="52" count="8" type="cond" truecount="1" falsecount="1"/>
<line num="53" count="8" type="stmt"/>
<line num="56" count="149" type="stmt"/>
<line num="57" count="149" type="cond" truecount="2" falsecount="0"/>
<line num="58" count="100" type="stmt"/>
<line num="62" count="89" type="stmt"/>
<line num="65" count="91" type="stmt"/>
<line num="66" count="16" type="stmt"/>
<line num="68" count="16" type="stmt"/>
<line num="70" count="30" type="cond" truecount="2" falsecount="0"/>
<line num="71" count="15" type="stmt"/>
<line num="74" count="1" type="stmt"/>
<line num="77" count="91" type="stmt"/>
<line num="78" count="76" type="cond" truecount="1" falsecount="1"/>
<line num="79" count="76" type="cond" truecount="2" falsecount="0"/>
<line num="80" count="1" type="stmt"/>
<line num="81" count="1" type="stmt"/>
<line num="82" count="1" type="stmt"/>
<line num="83" count="75" type="cond" truecount="1" falsecount="1"/>
<line num="84" count="75" type="stmt"/>
<line num="85" count="75" type="stmt"/>
<line num="86" count="75" type="stmt"/>
<line num="88" count="0" type="stmt"/>
<line num="91" count="91" type="stmt"/>
<line num="92" count="1634" type="stmt"/>
<line num="93" count="2118" type="stmt"/>
<line num="94" count="2118" type="cond" truecount="2" falsecount="0"/>
<line num="95" count="25" type="stmt"/>
<line num="96" count="25" type="stmt"/>
<line num="97" count="25" type="cond" truecount="2" falsecount="0"/>
<line num="98" count="5" type="stmt"/>
<line num="101" count="2093" type="cond" truecount="5" falsecount="0"/>
<line num="102" count="20" type="stmt"/>
<line num="103" count="2073" type="cond" truecount="2" falsecount="0"/>
<line num="104" count="1359" type="stmt"/>
<line num="109" count="91" type="stmt"/>
<line num="110" count="1634" type="stmt"/>
<line num="111" count="1634" type="stmt"/>
<line num="112" count="1634" type="cond" truecount="2" falsecount="0"/>
<line num="113" count="1384" type="cond" truecount="2" falsecount="0"/>
<line num="114" count="5" type="stmt"/>
<line num="115" count="1379" type="cond" truecount="4" falsecount="0"/>
<line num="116" count="20" type="stmt"/>
<line num="117" count="20" type="cond" truecount="1" falsecount="1"/>
<line num="118" count="20" type="stmt"/>
<line num="121" count="1359" type="stmt"/>
<line num="122" count="1359" type="cond" truecount="2" falsecount="0"/>
<line num="123" count="1005" type="stmt"/>
<line num="128" count="91" type="stmt"/>
<line num="129" count="190" type="stmt"/>
<line num="130" count="190" type="stmt"/>
<line num="131" count="190" type="stmt"/>
<line num="132" count="236" type="stmt"/>
<line num="133" count="236" type="stmt"/>
<line num="134" count="236" type="cond" truecount="2" falsecount="0"/>
<line num="135" count="4" type="stmt"/>
<line num="136" count="4" type="stmt"/>
<line num="138" count="232" type="cond" truecount="4" falsecount="0"/>
<line num="139" count="16" type="stmt"/>
<line num="140" count="16" type="cond" truecount="1" falsecount="1"/>
<line num="142" count="216" type="stmt"/>
<line num="143" count="216" type="cond" truecount="1" falsecount="1"/>
<line num="146" count="190" type="stmt"/>
<line num="149" count="91" type="stmt"/>
<line num="150" count="1638" type="cond" truecount="2" falsecount="0"/>
<line num="151" count="981" type="stmt"/>
<line num="152" count="1634" type="cond" truecount="1" falsecount="1"/>
<line num="153" count="1634" type="stmt"/>
<line num="159" count="91" type="stmt"/>
<line num="160" count="4291" type="cond" truecount="2" falsecount="0"/>
<line num="161" count="3608" type="stmt"/>
<line num="163" count="683" type="stmt"/>
<line num="164" count="683" type="stmt"/>
<line num="165" count="683" type="stmt"/>
<line num="167" count="91" type="stmt"/>
<line num="168" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="169" count="9" type="stmt"/>
<line num="172" count="91" type="stmt"/>
<line num="173" count="2463" type="stmt"/>
<line num="174" count="2463" type="stmt"/>
<line num="176" count="91" type="stmt"/>
<line num="177" count="919" type="cond" truecount="4" falsecount="0"/>
<line num="178" count="2" type="stmt"/>
<line num="181" count="91" type="stmt"/>
<line num="183" count="696" type="cond" truecount="2" falsecount="0"/>
<line num="184" count="493" type="stmt"/>
<line num="185" count="2311" type="stmt"/>
<line num="190" count="91" type="stmt"/>
<line num="193" count="17" type="stmt"/>
<line num="194" count="91" type="stmt"/>
</file>
</package>
<package name="src.utils">
<metrics statements="205" coveredstatements="165" conditionals="143" coveredconditionals="84" methods="26" coveredmethods="23"/>
<file name="classes.js" path="/Users/javve/git/list.js/src/utils/classes.js">
<metrics statements="50" coveredstatements="29" conditionals="30" coveredconditionals="10" methods="7" coveredmethods="7"/>
<line num="5" count="18" type="stmt"/>
<line num="11" count="18" type="stmt"/>
<line num="17" count="18" type="stmt"/>
<line num="27" count="18" type="stmt"/>
<line num="28" count="172" type="stmt"/>
<line num="39" count="172" type="cond" truecount="3" falsecount="1"/>
<line num="40" count="0" type="stmt"/>
<line num="42" count="172" type="stmt"/>
<line num="43" count="172" type="stmt"/>
<line num="54" count="18" type="stmt"/>
<line num="56" count="77" type="cond" truecount="1" falsecount="1"/>
<line num="57" count="77" type="stmt"/>
<line num="58" count="77" type="stmt"/>
<line num="62" count="0" type="stmt"/>
<line num="63" count="0" type="stmt"/>
<line num="64" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="65" count="0" type="stmt"/>
<line num="66" count="0" type="stmt"/>
<line num="79" count="18" type="stmt"/>
<line num="81" count="79" type="cond" truecount="1" falsecount="1"/>
<line num="82" count="79" type="stmt"/>
<line num="83" count="79" type="stmt"/>
<line num="87" count="0" type="stmt"/>
<line num="88" count="0" type="stmt"/>
<line num="89" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="90" count="0" type="stmt"/>
<line num="91" count="0" type="stmt"/>
<line num="106" count="18" type="stmt"/>
<line num="108" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="109" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="110" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="111" count="0" type="stmt"/>
<line num="114" count="2" type="stmt"/>
<line num="116" count="2" type="stmt"/>
<line num="120" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="121" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="122" count="0" type="stmt"/>
<line num="124" count="0" type="stmt"/>
<line num="127" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="128" count="0" type="stmt"/>
<line num="130" count="0" type="stmt"/>
<line num="134" count="0" type="stmt"/>
<line num="144" count="18" type="stmt"/>
<line num="145" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="146" count="1" type="stmt"/>
<line num="147" count="1" type="stmt"/>
<line num="148" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="149" count="1" type="stmt"/>
<line num="160" count="18" type="stmt"/>
<line num="161" count="13" type="cond" truecount="1" falsecount="1"/>
</file>
<file name="events.js" path="/Users/javve/git/list.js/src/utils/events.js">
<metrics statements="23" coveredstatements="11" conditionals="18" coveredconditionals="6" methods="5" coveredmethods="2"/>
<line num="1" count="17" type="cond" truecount="1" falsecount="1"/>
<line num="2" count="17" type="cond" truecount="1" falsecount="1"/>
<line num="3" count="17" type="cond" truecount="1" falsecount="1"/>
<line num="4" count="17" type="stmt"/>
<line num="16" count="17" type="stmt"/>
<line num="17" count="364" type="stmt"/>
<line num="18" count="364" type="stmt"/>
<line num="19" count="45" type="cond" truecount="2" falsecount="0"/>
<line num="33" count="17" type="stmt"/>
<line num="34" count="0" type="stmt"/>
<line num="35" count="0" type="stmt"/>
<line num="36" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="52" count="17" type="stmt"/>
<line num="54" count="180" type="cond" truecount="1" falsecount="1"/>
<line num="56" count="0" type="stmt"/>
<line num="57" count="0" type="stmt"/>
<line num="58" count="0" type="stmt"/>
<line num="59" count="0" type="stmt"/>
<line num="60" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="62" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="63" count="0" type="stmt"/>
<line num="64" count="0" type="stmt"/>
<line num="65" count="0" type="cond" truecount="0" falsecount="2"/>
</file>
<file name="extend.js" path="/Users/javve/git/list.js/src/utils/extend.js">
<metrics statements="7" coveredstatements="7" conditionals="2" coveredconditionals="1" methods="1" coveredmethods="1"/>
<line num="5" count="17" type="stmt"/>
<line num="7" count="181" type="stmt"/>
<line num="10" count="181" type="stmt"/>
<line num="11" count="181" type="cond" truecount="1" falsecount="1"/>
<line num="12" count="181" type="stmt"/>
<line num="13" count="188" type="stmt"/>
<line num="17" count="181" type="stmt"/>
</file>
<file name="fuzzy.js" path="/Users/javve/git/list.js/src/utils/fuzzy.js">
<metrics statements="59" coveredstatements="58" conditionals="32" coveredconditionals="24" methods="3" coveredmethods="3"/>
<line num="1" count="17" type="stmt"/>
<line num="3" count="60" type="cond" truecount="2" falsecount="0"/>
<line num="6" count="60" type="cond" truecount="1" falsecount="1"/>
<line num="9" count="60" type="cond" truecount="1" falsecount="1"/>
<line num="11" count="60" type="cond" truecount="1" falsecount="1"/>
<line num="12" count="60" type="cond" truecount="1" falsecount="1"/>
<line num="15" count="60" type="stmt"/>
<line num="16" count="60" type="stmt"/>
<line num="17" count="60" type="stmt"/>
<line num="20" count="60" type="stmt"/>
<line num="21" count="330" type="stmt"/>
<line num="24" count="60" type="stmt"/>
<line num="25" count="330" type="stmt"/>
<line num="28" count="60" type="stmt"/>
<line num="35" count="698" type="stmt"/>
<line num="36" count="698" type="stmt"/>
<line num="38" count="698" type="cond" truecount="1" falsecount="1"/>
<line num="40" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="42" count="698" type="stmt"/>
<line num="45" count="60" type="stmt"/>
<line num="46" count="60" type="stmt"/>
<line num="48" count="60" type="cond" truecount="2" falsecount="0"/>
<line num="49" count="9" type="stmt"/>
<line num="51" count="9" type="stmt"/>
<line num="53" count="9" type="cond" truecount="2" falsecount="0"/>
<line num="54" count="2" type="stmt"/>
<line num="59" count="60" type="stmt"/>
<line num="60" count="60" type="stmt"/>
<line num="63" count="60" type="stmt"/>
<line num="65" count="60" type="stmt"/>
<line num="69" count="161" type="stmt"/>
<line num="70" count="161" type="stmt"/>
<line num="71" count="161" type="stmt"/>
<line num="72" count="515" type="cond" truecount="2" falsecount="0"/>
<line num="73" count="277" type="stmt"/>
<line num="75" count="238" type="stmt"/>
<line num="77" count="515" type="stmt"/>
<line num="80" count="161" type="stmt"/>
<line num="81" count="161" type="stmt"/>
<line num="82" count="161" type="stmt"/>
<line num="84" count="161" type="stmt"/>
<line num="85" count="161" type="stmt"/>
<line num="86" count="161" type="stmt"/>
<line num="89" count="3104" type="stmt"/>
<line num="90" count="3104" type="cond" truecount="2" falsecount="0"/>
<line num="92" count="1225" type="stmt"/>
<line num="95" count="1879" type="stmt"/>
<line num="97" count="3104" type="cond" truecount="2" falsecount="0"/>
<line num="98" count="11" type="stmt"/>
<line num="101" count="11" type="cond" truecount="1" falsecount="1"/>
<line num="103" count="11" type="stmt"/>
<line num="104" count="11" type="stmt"/>
<line num="105" count="11" type="cond" truecount="2" falsecount="0"/>
<line num="107" count="9" type="stmt"/>
<line num="110" count="2" type="stmt"/>
<line num="116" count="161" type="cond" truecount="2" falsecount="0"/>
<line num="117" count="60" type="stmt"/>
<line num="119" count="101" type="stmt"/>
<line num="122" count="60" type="cond" truecount="2" falsecount="0"/>
</file>
<file name="get-attribute.js" path="/Users/javve/git/list.js/src/utils/get-attribute.js">
<metrics statements="10" coveredstatements="9" conditionals="9" coveredconditionals="7" methods="1" coveredmethods="1"/>
<line num="12" count="17" type="stmt"/>
<line num="13" count="116" type="cond" truecount="3" falsecount="0"/>
<line num="14" count="116" type="cond" truecount="2" falsecount="0"/>
<line num="15" count="26" type="stmt"/>
<line num="16" count="26" type="stmt"/>
<line num="17" count="26" type="stmt"/>
<line num="18" count="83" type="cond" truecount="1" falsecount="1"/>
<line num="19" count="83" type="cond" truecount="1" falsecount="1"/>
<line num="20" count="0" type="stmt"/>
<line num="25" count="116" type="stmt"/>
</file>
<file name="get-by-class.js" path="/Users/javve/git/list.js/src/utils/get-by-class.js">
<metrics statements="30" coveredstatements="28" conditionals="22" coveredconditionals="18" methods="5" coveredmethods="5"/>
<line num="15" count="18" type="stmt"/>
<line num="16" count="2220" type="cond" truecount="2" falsecount="0"/>
<line num="17" count="1859" type="stmt"/>
<line num="19" count="361" type="stmt"/>
<line num="23" count="18" type="stmt"/>
<line num="24" count="1" type="stmt"/>
<line num="25" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="26" count="0" type="stmt"/>
<line num="28" count="1" type="stmt"/>
<line num="32" count="18" type="stmt"/>
<line num="33" count="1" type="stmt"/>
<line num="34" count="1" type="stmt"/>
<line num="36" count="1" type="stmt"/>
<line num="37" count="1" type="stmt"/>
<line num="38" count="1" type="stmt"/>
<line num="39" count="1" type="stmt"/>
<line num="40" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="41" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="42" count="0" type="stmt"/>
<line num="44" count="1" type="stmt"/>
<line num="45" count="1" type="stmt"/>
<line num="49" count="1" type="stmt"/>
<line num="52" count="18" type="stmt"/>
<line num="53" count="18" type="stmt"/>
<line num="54" count="2222" type="cond" truecount="2" falsecount="0"/>
<line num="55" count="2222" type="cond" truecount="6" falsecount="0"/>
<line num="56" count="2220" type="stmt"/>
<line num="57" count="2" type="cond" truecount="5" falsecount="1"/>
<line num="58" count="1" type="stmt"/>
<line num="60" count="1" type="stmt"/>
</file>
<file name="index-of.js" path="/Users/javve/git/list.js/src/utils/index-of.js">
<metrics statements="6" coveredstatements="3" conditionals="4" coveredconditionals="1" methods="1" coveredmethods="1"/>
<line num="1" count="18" type="stmt"/>
<line num="3" count="18" type="stmt"/>
<line num="4" count="3" type="cond" truecount="1" falsecount="1"/>
<line num="5" count="0" type="stmt"/>
<line num="6" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="8" count="0" type="stmt"/>
</file>
<file name="to-array.js" path="/Users/javve/git/list.js/src/utils/to-array.js">
<metrics statements="15" coveredstatements="15" conditionals="22" coveredconditionals="13" methods="2" coveredmethods="2"/>
<line num="12" count="17" type="stmt"/>
<line num="13" count="364" type="cond" truecount="1" falsecount="1"/>
<line num="14" count="364" type="cond" truecount="1" falsecount="1"/>
<line num="15" count="364" type="cond" truecount="1" falsecount="1"/>
<line num="16" count="364" type="cond" truecount="1" falsecount="1"/>
<line num="17" count="364" type="cond" truecount="1" falsecount="1"/>
<line num="18" count="364" type="cond" truecount="2" falsecount="0"/>
<line num="19" count="360" type="cond" truecount="2" falsecount="2"/>
<line num="21" count="360" type="stmt"/>
<line num="22" count="360" type="stmt"/>
<line num="23" count="41" type="cond" truecount="2" falsecount="2"/>
<line num="24" count="41" type="stmt"/>
<line num="27" count="360" type="cond" truecount="2" falsecount="0"/>
<line num="28" count="27" type="stmt"/>
<line num="32" count="364" type="stmt"/>
</file>
<file name="to-string.js" path="/Users/javve/git/list.js/src/utils/to-string.js">
<metrics statements="5" coveredstatements="5" conditionals="4" coveredconditionals="4" methods="1" coveredmethods="1"/>
<line num="1" count="17" type="stmt"/>
<line num="2" count="132" type="cond" truecount="2" falsecount="0"/>
<line num="3" count="132" type="cond" truecount="2" falsecount="0"/>
<line num="4" count="132" type="stmt"/>
<line num="5" count="132" type="stmt"/>
</file>
</package>
</project>
</coverage>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,224 @@
body, html {
margin:0; padding: 0;
height: 100%;
}
body {
font-family: Helvetica Neue, Helvetica, Arial;
font-size: 14px;
color:#333;
}
.small { font-size: 12px; }
*, *:after, *:before {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
h1 { font-size: 20px; margin: 0;}
h2 { font-size: 14px; }
pre {
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
margin: 0;
padding: 0;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
}
a { color:#0074D9; text-decoration:none; }
a:hover { text-decoration:underline; }
.strong { font-weight: bold; }
.space-top1 { padding: 10px 0 0 0; }
.pad2y { padding: 20px 0; }
.pad1y { padding: 10px 0; }
.pad2x { padding: 0 20px; }
.pad2 { padding: 20px; }
.pad1 { padding: 10px; }
.space-left2 { padding-left:55px; }
.space-right2 { padding-right:20px; }
.center { text-align:center; }
.clearfix { display:block; }
.clearfix:after {
content:'';
display:block;
height:0;
clear:both;
visibility:hidden;
}
.fl { float: left; }
@media only screen and (max-width:640px) {
.col3 { width:100%; max-width:100%; }
.hide-mobile { display:none!important; }
}
.quiet {
color: #7f7f7f;
color: rgba(0,0,0,0.5);
}
.quiet a { opacity: 0.7; }
.fraction {
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 10px;
color: #555;
background: #E8E8E8;
padding: 4px 5px;
border-radius: 3px;
vertical-align: middle;
}
div.path a:link, div.path a:visited { color: #333; }
table.coverage {
border-collapse: collapse;
margin: 10px 0 0 0;
padding: 0;
}
table.coverage td {
margin: 0;
padding: 0;
vertical-align: top;
}
table.coverage td.line-count {
text-align: right;
padding: 0 5px 0 20px;
}
table.coverage td.line-coverage {
text-align: right;
padding-right: 10px;
min-width:20px;
}
table.coverage td span.cline-any {
display: inline-block;
padding: 0 5px;
width: 100%;
}
.missing-if-branch {
display: inline-block;
margin-right: 5px;
border-radius: 3px;
position: relative;
padding: 0 4px;
background: #333;
color: yellow;
}
.skip-if-branch {
display: none;
margin-right: 10px;
position: relative;
padding: 0 4px;
background: #ccc;
color: white;
}
.missing-if-branch .typ, .skip-if-branch .typ {
color: inherit !important;
}
.coverage-summary {
border-collapse: collapse;
width: 100%;
}
.coverage-summary tr { border-bottom: 1px solid #bbb; }
.keyline-all { border: 1px solid #ddd; }
.coverage-summary td, .coverage-summary th { padding: 10px; }
.coverage-summary tbody { border: 1px solid #bbb; }
.coverage-summary td { border-right: 1px solid #bbb; }
.coverage-summary td:last-child { border-right: none; }
.coverage-summary th {
text-align: left;
font-weight: normal;
white-space: nowrap;
}
.coverage-summary th.file { border-right: none !important; }
.coverage-summary th.pct { }
.coverage-summary th.pic,
.coverage-summary th.abs,
.coverage-summary td.pct,
.coverage-summary td.abs { text-align: right; }
.coverage-summary td.file { white-space: nowrap; }
.coverage-summary td.pic { min-width: 120px !important; }
.coverage-summary tfoot td { }
.coverage-summary .sorter {
height: 10px;
width: 7px;
display: inline-block;
margin-left: 0.5em;
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
}
.coverage-summary .sorted .sorter {
background-position: 0 -20px;
}
.coverage-summary .sorted-desc .sorter {
background-position: 0 -10px;
}
.status-line { height: 10px; }
/* yellow */
.cbranch-no { background: yellow !important; color: #111; }
/* dark red */
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
.low .chart { border:1px solid #C21F39 }
.highlighted,
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
background: #C21F39 !important;
}
/* medium red */
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
/* light red */
.low, .cline-no { background:#FCE1E5 }
/* light green */
.high, .cline-yes { background:rgb(230,245,208) }
/* medium green */
.cstat-yes { background:rgb(161,215,106) }
/* dark green */
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
.high .chart { border:1px solid rgb(77,146,33) }
/* dark yellow (gold) */
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
.medium .chart { border:1px solid #f9cd0b; }
/* light yellow */
.medium { background: #fff4c2; }
.cstat-skip { background: #ddd; color: #111; }
.fstat-skip { background: #ddd; color: #111 !important; }
.cbranch-skip { background: #ddd !important; color: #111; }
span.cline-neutral { background: #eaeaea; }
.coverage-summary td.empty {
opacity: .5;
padding-top: 4px;
padding-bottom: 4px;
line-height: 1;
color: #888;
}
.cover-fill, .cover-empty {
display:inline-block;
height: 12px;
}
.chart {
line-height: 0;
}
.cover-empty {
background: white;
}
.cover-full {
border-right: none !important;
}
pre.prettyprint {
border: none !important;
padding: 0 !important;
margin: 0 !important;
}
.com { color: #999 !important; }
.ignore-none { color: #999; font-weight: normal; }
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -48px;
}
.footer, .push {
height: 48px;
}

View file

@ -0,0 +1,79 @@
/* eslint-disable */
var jumpToCode = (function init() {
// Classes of code we would like to highlight in the file view
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
// Elements to highlight in the file listing view
var fileListingElements = ['td.pct.low'];
// We don't want to select elements that are direct descendants of another match
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
// Selecter that finds elements on the page to which we can jump
var selector =
fileListingElements.join(', ') +
', ' +
notSelector +
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
// The NodeList of matching elements
var missingCoverageElements = document.querySelectorAll(selector);
var currentIndex;
function toggleClass(index) {
missingCoverageElements
.item(currentIndex)
.classList.remove('highlighted');
missingCoverageElements.item(index).classList.add('highlighted');
}
function makeCurrent(index) {
toggleClass(index);
currentIndex = index;
missingCoverageElements.item(index).scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'center'
});
}
function goToPrevious() {
var nextIndex = 0;
if (typeof currentIndex !== 'number' || currentIndex === 0) {
nextIndex = missingCoverageElements.length - 1;
} else if (missingCoverageElements.length > 1) {
nextIndex = currentIndex - 1;
}
makeCurrent(nextIndex);
}
function goToNext() {
var nextIndex = 0;
if (
typeof currentIndex === 'number' &&
currentIndex < missingCoverageElements.length - 1
) {
nextIndex = currentIndex + 1;
}
makeCurrent(nextIndex);
}
return function jump(event) {
switch (event.which) {
case 78: // n
case 74: // j
goToNext();
break;
case 66: // b
case 75: // k
case 80: // p
goToPrevious();
break;
}
};
})();
window.addEventListener('keydown', jumpToCode);

View file

@ -0,0 +1,194 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for events.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> events.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">68.75% </span>
<span class="quiet">Statements</span>
<span class='fraction'>11/16</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Branches</span>
<span class='fraction'>5/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">75% </span>
<span class="quiet">Lines</span>
<span class='fraction'>9/12</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">344x</span>
<span class="cline-any cline-yes">344x</span>
<span class="cline-any cline-yes">45x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var bind = window.addEventListener ? 'addEventListener' : <span class="branch-1 cbranch-no" title="branch not covered" >'attachEvent',</span>
unbind = window.removeEventListener ? 'removeEventListener' : <span class="branch-1 cbranch-no" title="branch not covered" >'detachEvent',</span>
prefix = bind !== 'addEventListener' ? <span class="branch-0 cbranch-no" title="branch not covered" >'on' </span>: '',
toArray = require('./to-array')
&nbsp;
/**
* Bind `el` event `type` to `fn`.
*
* @param {Element} el, NodeList, HTMLCollection or Array
* @param {String} type
* @param {Function} fn
* @param {Boolean} capture
* @api public
*/
&nbsp;
exports.bind = function(el, type, fn, capture){
el = toArray(el);
for ( var i = 0, il = el.length; i &lt; il; i++ ) {
el[i][bind](prefix + type, fn, capture || false);
}
}
&nbsp;
/**
* Unbind `el` event `type`'s callback `fn`.
*
* @param {Element} el, NodeList, HTMLCollection or Array
* @param {String} type
* @param {Function} fn
* @param {Boolean} capture
* @api public
*/
&nbsp;
exports.unbind = <span class="fstat-no" title="function not covered" >fu</span>nction(el, type, fn, capture){
<span class="cstat-no" title="statement not covered" > el = toArray(el);</span>
<span class="cstat-no" title="statement not covered" > for ( var i = <span class="cstat-no" title="statement not covered" >0,</span> il = <span class="cstat-no" title="statement not covered" >el.length;</span> i &lt; il; i++ ) {</span>
<span class="cstat-no" title="statement not covered" > el[i][unbind](prefix + type, fn, capture || false);</span>
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Nov 21 2020 22:28:41 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

View file

@ -0,0 +1,167 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for filter.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> filter.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>21/21</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>19/19</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">83x</span>
<span class="cline-any cline-yes">83x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">83x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">47x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-yes">122x</span>
<span class="cline-any cline-yes">122x</span>
<span class="cline-any cline-yes">70x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">52x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (list) {
// Add handlers
list.handlers.filterStart = list.handlers.filterStart || []
list.handlers.filterComplete = list.handlers.filterComplete || []
&nbsp;
return function (filterFunction) {
list.trigger('filterStart')
&nbsp;
list.i = 1 // Reset paging
list.reset.filter()
if (filterFunction === undefined) {
list.filtered = false
} else {
list.filtered = true
var is = list.items
for (var i = 0, il = is.length; i &lt; il; i++) {
var item = is[i]
if (filterFunction(item)) {
item.filtered = true
} else {
item.filtered = false
}
}
}
list.update()
list.trigger('filterComplete')
return list.visibleItems
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Nov 21 2020 15:35:43 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,449 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for fuzzy.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> fuzzy.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">95.24% </span>
<span class="quiet">Statements</span>
<span class='fraction'>60/63</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">75% </span>
<span class="quiet">Branches</span>
<span class='fraction'>24/32</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">98.31% </span>
<span class="quiet">Lines</span>
<span class='fraction'>58/59</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">330x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">330x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">698x</span>
<span class="cline-any cline-yes">698x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">698x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">698x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">515x</span>
<span class="cline-any cline-yes">277x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">238x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">515x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3104x</span>
<span class="cline-any cline-yes">3104x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1225x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1879x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3104x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">101x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (text, pattern, options) {
// Aproximately where in the text is the pattern expected to be found?
var Match_Location = options.location || 0
&nbsp;
//Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
var Match_Distance = options.distance || <span class="branch-1 cbranch-no" title="branch not covered" >100</span>
&nbsp;
// At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.
var Match_Threshold = options.threshold || <span class="branch-1 cbranch-no" title="branch not covered" >0.4</span>
&nbsp;
<span class="missing-if-branch" title="if path not taken" >I</span>if (pattern === text) <span class="cstat-no" title="statement not covered" >return true </span>// Exact match
<span class="missing-if-branch" title="if path not taken" >I</span>if (pattern.length &gt; 32) <span class="cstat-no" title="statement not covered" >return false </span>// This algorithm cannot be used
&nbsp;
// Set starting location at beginning text and initialise the alphabet.
var loc = Match_Location,
s = (function () {
var q = {},
i
&nbsp;
for (i = 0; i &lt; pattern.length; i++) {
q[pattern.charAt(i)] = 0
}
&nbsp;
for (i = 0; i &lt; pattern.length; i++) {
q[pattern.charAt(i)] |= 1 &lt;&lt; (pattern.length - i - 1)
}
&nbsp;
return q
})()
&nbsp;
// Compute and return the score for a match with e errors and x location.
// Accesses loc and pattern through being a closure.
&nbsp;
function match_bitapScore_(e, x) {
var accuracy = e / pattern.length,
proximity = Math.abs(loc - x)
&nbsp;
<span class="missing-if-branch" title="if path not taken" >I</span>if (!Match_Distance) {
// Dodge divide by zero error.
<span class="cstat-no" title="statement not covered" > return proximity ? 1.0 : accuracy</span>
}
return accuracy + proximity / Match_Distance
}
&nbsp;
var score_threshold = Match_Threshold, // Highest score beyond which we give up.
best_loc = text.indexOf(pattern, loc) // Is there a nearby exact match? (speedup)
&nbsp;
if (best_loc != -1) {
score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)
// What about in the other direction? (speedup)
best_loc = text.lastIndexOf(pattern, loc + pattern.length)
&nbsp;
if (best_loc != -1) {
score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)
}
}
&nbsp;
// Initialise the bit arrays.
var matchmask = 1 &lt;&lt; (pattern.length - 1)
best_loc = -1
&nbsp;
var bin_min, bin_mid
var bin_max = pattern.length + text.length
var last_rd
for (var d = 0; d &lt; pattern.length; d++) {
// Scan for the best match; each iteration allows for one more error.
// Run a binary search to determine how far from 'loc' we can stray at this
// error level.
bin_min = 0
bin_mid = bin_max
while (bin_min &lt; bin_mid) {
if (match_bitapScore_(d, loc + bin_mid) &lt;= score_threshold) {
bin_min = bin_mid
} else {
bin_max = bin_mid
}
bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min)
}
// Use the result from this iteration as the maximum for the next.
bin_max = bin_mid
var start = Math.max(1, loc - bin_mid + 1)
var finish = Math.min(loc + bin_mid, text.length) + pattern.length
&nbsp;
var rd = Array(finish + 2)
rd[finish + 1] = (1 &lt;&lt; d) - 1
for (var j = finish; j &gt;= start; j--) {
// The alphabet (s) is a sparse hash, so the following line generates
// warnings.
var charMatch = s[text.charAt(j - 1)]
if (d === 0) {
// First pass: exact match.
rd[j] = ((rd[j + 1] &lt;&lt; 1) | 1) &amp; charMatch
} else {
// Subsequent passes: fuzzy match.
rd[j] = (((rd[j + 1] &lt;&lt; 1) | 1) &amp; charMatch) | (((last_rd[j + 1] | last_rd[j]) &lt;&lt; 1) | 1) | last_rd[j + 1]
}
if (rd[j] &amp; matchmask) {
var score = match_bitapScore_(d, j - 1)
// This match will almost certainly be better than any existing match.
// But check anyway.
<span class="missing-if-branch" title="else path not taken" >E</span>if (score &lt;= score_threshold) {
// Told you so.
score_threshold = score
best_loc = j - 1
if (best_loc &gt; loc) {
// When passing loc, don't exceed our current distance from loc.
start = Math.max(1, 2 * loc - best_loc)
} else {
// Already passed loc, downhill from here on in.
break
}
}
}
}
// No hope for a (better) match at greater error levels.
if (match_bitapScore_(d + 1, loc) &gt; score_threshold) {
break
}
last_rd = rd
}
&nbsp;
return best_loc &lt; 0 ? false : true
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Nov 21 2020 22:27:40 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,107 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for index-of.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> index-of.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">40% </span>
<span class="quiet">Statements</span>
<span class='fraction'>4/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">25% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Lines</span>
<span class='fraction'>3/6</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var indexOf = [].indexOf
&nbsp;
module.exports = function(arr, obj){
<span class="missing-if-branch" title="else path not taken" >E</span>if (indexOf) return arr.indexOf(obj);
<span class="cstat-no" title="statement not covered" > for (var i = <span class="cstat-no" title="statement not covered" >0,</span> il = <span class="cstat-no" title="statement not covered" >arr.length;</span> i &lt; il; ++i) {</span>
<span class="cstat-no" title="statement not covered" > if (arr[i] === obj) <span class="cstat-no" title="statement not covered" >return i;</span></span>
}
<span class="cstat-no" title="statement not covered" > return -1</span>
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Nov 21 2020 22:28:41 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,126 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for All files</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>All files</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">91.48% </span>
<span class="quiet">Statements</span>
<span class='fraction'>805/880</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">80.89% </span>
<span class="quiet">Branches</span>
<span class='fraction'>364/450</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">95.76% </span>
<span class="quiet">Functions</span>
<span class='fraction'>113/118</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">93.33% </span>
<span class="quiet">Lines</span>
<span class='fraction'>742/795</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="src"><a href="src/index.html">src</a></td>
<td data-value="97.51" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 97%"></div><div class="cover-empty" style="width: 3%"></div></div>
</td>
<td data-value="97.51" class="pct high">97.51%</td>
<td data-value="643" class="abs high">627/643</td>
<td data-value="91.21" class="pct high">91.21%</td>
<td data-value="307" class="abs high">280/307</td>
<td data-value="97.83" class="pct high">97.83%</td>
<td data-value="92" class="abs high">90/92</td>
<td data-value="97.8" class="pct high">97.8%</td>
<td data-value="590" class="abs high">577/590</td>
</tr>
<tr>
<td class="file medium" data-value="src/utils"><a href="src/utils/index.html">src/utils</a></td>
<td data-value="75.11" class="pic medium">
<div class="chart"><div class="cover-fill" style="width: 75%"></div><div class="cover-empty" style="width: 25%"></div></div>
</td>
<td data-value="75.11" class="pct medium">75.11%</td>
<td data-value="237" class="abs medium">178/237</td>
<td data-value="58.74" class="pct medium">58.74%</td>
<td data-value="143" class="abs medium">84/143</td>
<td data-value="88.46" class="pct high">88.46%</td>
<td data-value="26" class="abs high">23/26</td>
<td data-value="80.49" class="pct high">80.49%</td>
<td data-value="205" class="abs high">165/205</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,203 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for item.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> item.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>23/23</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">95.45% </span>
<span class="quiet">Branches</span>
<span class='fraction'>21/22</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>21/21</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-yes">1011x</span>
<span class="cline-any cline-yes">1011x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-yes">5416x</span>
<span class="cline-any cline-yes">1121x</span>
<span class="cline-any cline-yes">1716x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1121x</span>
<span class="cline-any cline-yes">302x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4295x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-yes">4634x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1012x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const templater = require('./templater')
&nbsp;
module.exports = function (initValues, { element, template } = {}) {
var item = this
&nbsp;
this._values = {}
&nbsp;
this.found = false
this.filtered = false
&nbsp;
var init = function (values, { element, template } = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> {
if (element) item.elm = element
if (!template) throw new Error('missing_item_template')
item.template = template
item.values(values)
}
&nbsp;
this.values = function (newValues) {
if (newValues !== undefined) {
for (var name in newValues) {
item._values[name] = newValues[name]
}
if (item.elm) {
templater.set(item.elm, item.values(), item.template.valueNames)
}
} else {
return item._values
}
}
&nbsp;
this.matching = function ({ searched, filtered }) {
return (
(filtered &amp;&amp; searched &amp;&amp; item.found &amp;&amp; item.filtered) ||
(filtered &amp;&amp; !searched &amp;&amp; item.filtered) ||
(!filtered &amp;&amp; searched &amp;&amp; item.found) ||
(!filtered &amp;&amp; !searched)
)
}
&nbsp;
init(initValues, { element, template })
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Thu Dec 17 2020 00:31:01 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,404 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for pagination.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> pagination.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">90.91% </span>
<span class="quiet">Statements</span>
<span class='fraction'>50/55</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90.7% </span>
<span class="quiet">Branches</span>
<span class='fraction'>39/43</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">91.67% </span>
<span class="quiet">Functions</span>
<span class='fraction'>11/12</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90.74% </span>
<span class="quiet">Lines</span>
<span class='fraction'>49/54</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">86x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">86x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">234x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">234x</span>
<span class="cline-any cline-yes">95x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">95x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">95x</span>
<span class="cline-any cline-yes">95x</span>
<span class="cline-any cline-yes">139x</span>
<span class="cline-any cline-yes">30x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">30x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">86x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">234x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">234x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">249x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">239x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">139x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">139x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">124x</span>
<span class="cline-any cline-yes">39x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">85x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">86x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var classes = require('./utils/classes'),
events = require('./utils/events'),
List = require('./index')
&nbsp;
module.exports = function (list) {
var isHidden = false
&nbsp;
var refresh = function (pagingList, options) {
if (list.page &lt; 1) {
list.listContainer.style.display = 'none'
isHidden = true
return
} else if (isHidden) {
list.listContainer.style.display = 'block'
}
&nbsp;
var item,
l = list.matchingItems.length,
index = list.i,
page = list.page,
pages = Math.ceil(l / page),
currentPage = Math.ceil(index / page),
innerWindow = options.innerWindow || 2,
left = options.left || options.outerWindow || 0,
right = options.right || options.outerWindow || 0
&nbsp;
right = pages - right
pagingList.clear()
for (var i = 1; i &lt;= pages; i++) {
var className = currentPage === i ? 'active' : ''
&nbsp;
//console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);
&nbsp;
if (is.number(i, left, right, currentPage, innerWindow)) {
item = pagingList.add({
page: i,
dotted: false,
})[0]
if (className) {
classes(item.elm).add(className)
}
item.elm.firstChild.setAttribute('data-i', i)
item.elm.firstChild.setAttribute('data-page', page)
} else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {
item = pagingList.add({
page: '...',
dotted: true,
})[0]
classes(item.elm).add('disabled')
}
}
}
&nbsp;
var is = {
number: function (i, left, right, currentPage, innerWindow) {
return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow)
},
left: function (i, left) {
return i &lt;= left
},
right: function (i, right) {
return i &gt; right
},
innerWindow: function (i, currentPage, innerWindow) {
return i &gt;= currentPage - innerWindow &amp;&amp; i &lt;= currentPage + innerWindow
},
dotted: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {
return (
this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) ||
this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)
)
},
dottedLeft: function (pagingList, i, left, right, currentPage, innerWindow) {
return i == left + 1 &amp;&amp; !this.innerWindow(i, currentPage, innerWindow) &amp;&amp; !this.right(i, right)
},
dottedRight: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {
if (pagingList.items[currentPageItem - 1].values().dotted) {
return false
} else {
return i == right &amp;&amp; !this.innerWindow(i, currentPage, innerWindow) &amp;&amp; !this.right(i, right)
}
},
}
&nbsp;
return function (options) {
var pagingList = new List(list.listContainer.id, {
listClass: options.paginationClass || 'pagination',
item: options.item || "&lt;li&gt;&lt;a class='page' href='#'&gt;&lt;/a&gt;&lt;/li&gt;",
valueNames: ['page', 'dotted'],
searchClass: 'pagination-search-that-is-not-supposed-to-exist',
sortClass: 'pagination-sort-that-is-not-supposed-to-exist',
})
&nbsp;
events.bind(pagingList.listContainer, 'click', <span class="fstat-no" title="function not covered" >fu</span>nction (e) {
var target = <span class="cstat-no" title="statement not covered" >e.target || e.srcElement,</span>
page = <span class="cstat-no" title="statement not covered" >list.utils.getAttribute(target, 'data-page'),</span>
i = <span class="cstat-no" title="statement not covered" >list.utils.getAttribute(target, 'data-i')</span>
<span class="cstat-no" title="statement not covered" > if (i) {</span>
<span class="cstat-no" title="statement not covered" > list.show((i - 1) * page + 1, page)</span>
}
})
&nbsp;
list.on('updated', function () {
refresh(pagingList, options)
})
refresh(pagingList, options)
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Nov 21 2020 23:03:57 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,221 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for parse.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> parse.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">21.88% </span>
<span class="quiet">Statements</span>
<span class='fraction'>7/32</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">25% </span>
<span class="quiet">Branches</span>
<span class='fraction'>2/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">16.67% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">25% </span>
<span class="quiet">Lines</span>
<span class='fraction'>7/28</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">93x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">93x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">93x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">93x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">93x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">93x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (list) {
var Item = require('./item')(list)
&nbsp;
var getChildren = <span class="fstat-no" title="function not covered" >fu</span>nction (parent) {
var nodes = <span class="cstat-no" title="statement not covered" >parent.childNodes,</span>
items = <span class="cstat-no" title="statement not covered" >[]</span>
<span class="cstat-no" title="statement not covered" > for (var i = <span class="cstat-no" title="statement not covered" >0,</span> il = <span class="cstat-no" title="statement not covered" >nodes.length;</span> i &lt; il; i++) {</span>
// Only textnodes have a data attribute
<span class="cstat-no" title="statement not covered" > if (nodes[i].data === undefined) {</span>
<span class="cstat-no" title="statement not covered" > items.push(nodes[i])</span>
}
}
<span class="cstat-no" title="statement not covered" > return items</span>
}
&nbsp;
var parse = <span class="fstat-no" title="function not covered" >fu</span>nction (itemElements, valueNames) {
<span class="cstat-no" title="statement not covered" > for (var i = <span class="cstat-no" title="statement not covered" >0,</span> il = <span class="cstat-no" title="statement not covered" >itemElements.length;</span> i &lt; il; i++) {</span>
var values = <span class="cstat-no" title="statement not covered" >list.templater.get(itemElements[i])</span>
<span class="cstat-no" title="statement not covered" > list.items.push(new Item(values, itemElements[i]))</span>
}
}
var parseAsync = <span class="fstat-no" title="function not covered" >fu</span>nction (itemElements, valueNames) {
var itemsToIndex = <span class="cstat-no" title="statement not covered" >itemElements.splice(0, 50) </span>// TODO: If &lt; 100 items, what happens in IE etc?
<span class="cstat-no" title="statement not covered" > parse(itemsToIndex, valueNames)</span>
<span class="cstat-no" title="statement not covered" > if (itemElements.length &gt; 0) {</span>
<span class="cstat-no" title="statement not covered" > setTimeout(<span class="fstat-no" title="function not covered" >fu</span>nction () {</span>
<span class="cstat-no" title="statement not covered" > parseAsync(itemElements, valueNames)</span>
}, 1)
} else {
<span class="cstat-no" title="statement not covered" > list.update()</span>
<span class="cstat-no" title="statement not covered" > list.trigger('parseComplete')</span>
}
}
&nbsp;
list.handlers.parseComplete = list.handlers.parseComplete || []
&nbsp;
return <span class="fstat-no" title="function not covered" >fu</span>nction () {
var itemsToIndex = <span class="cstat-no" title="statement not covered" >getChildren(list.list),</span>
valueNames = <span class="cstat-no" title="statement not covered" >list.valueNames</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > if (list.indexAsync) {</span>
<span class="cstat-no" title="statement not covered" > parseAsync(itemsToIndex, valueNames)</span>
} else {
<span class="cstat-no" title="statement not covered" > parse(itemsToIndex, valueNames)</span>
}
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Nov 28 2020 19:06:38 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1 @@
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,488 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for search.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> search.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/87</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/49</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/11</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/77</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >module.exports = <span class="fstat-no" title="function not covered" >fu</span>nction (list) {</span>
var item, text, columns, searchString, customSearch
&nbsp;
var prepare = <span class="cstat-no" title="statement not covered" >{</span>
resetList: <span class="fstat-no" title="function not covered" >fu</span>nction () {
<span class="cstat-no" title="statement not covered" > list.i = 1</span>
<span class="cstat-no" title="statement not covered" > list.templater.clear(list.list)</span>
<span class="cstat-no" title="statement not covered" > customSearch = undefined</span>
},
setOptions: <span class="fstat-no" title="function not covered" >fu</span>nction (args) {
<span class="cstat-no" title="statement not covered" > if (args.length == 2 &amp;&amp; args[1] instanceof Array) {</span>
<span class="cstat-no" title="statement not covered" > columns = args[1]</span>
} else <span class="cstat-no" title="statement not covered" >if (args.length == 2 &amp;&amp; typeof args[1] == 'function') {</span>
<span class="cstat-no" title="statement not covered" > columns = undefined</span>
<span class="cstat-no" title="statement not covered" > customSearch = args[1]</span>
} else <span class="cstat-no" title="statement not covered" >if (args.length == 3) {</span>
<span class="cstat-no" title="statement not covered" > columns = args[1]</span>
<span class="cstat-no" title="statement not covered" > customSearch = args[2]</span>
} else {
<span class="cstat-no" title="statement not covered" > columns = undefined</span>
}
},
setColumns: <span class="fstat-no" title="function not covered" >fu</span>nction () {
<span class="cstat-no" title="statement not covered" > if (list.items.length === 0) <span class="cstat-no" title="statement not covered" >return</span></span>
<span class="cstat-no" title="statement not covered" > if (columns === undefined) {</span>
<span class="cstat-no" title="statement not covered" > columns = list.searchColumns === undefined ? prepare.toArray(list.items[0].values()) : list.searchColumns</span>
}
},
setSearchString: <span class="fstat-no" title="function not covered" >fu</span>nction (s) {
<span class="cstat-no" title="statement not covered" > s = list.utils.toString(s).toLowerCase()</span>
<span class="cstat-no" title="statement not covered" > s = s.replace(/[-[\]{}()*+?.,\\^$|#]/g, '\\$&amp;') </span>// Escape regular expression characters
<span class="cstat-no" title="statement not covered" > searchString = s</span>
},
toArray: <span class="fstat-no" title="function not covered" >fu</span>nction (values) {
var tmpColumn = <span class="cstat-no" title="statement not covered" >[]</span>
<span class="cstat-no" title="statement not covered" > for (var name in values) {</span>
<span class="cstat-no" title="statement not covered" > tmpColumn.push(name)</span>
}
<span class="cstat-no" title="statement not covered" > return tmpColumn</span>
},
}
var search = <span class="cstat-no" title="statement not covered" >{</span>
list: <span class="fstat-no" title="function not covered" >fu</span>nction () {
// Extract quoted phrases "word1 word2" from original searchString
// searchString is converted to lowercase by List.js
var words = <span class="cstat-no" title="statement not covered" >[],</span>
phrase,
ss = <span class="cstat-no" title="statement not covered" >searchString</span>
<span class="cstat-no" title="statement not covered" > while ((phrase = ss.match(/"([^"]+)"/)) !== null) {</span>
<span class="cstat-no" title="statement not covered" > words.push(phrase[1])</span>
<span class="cstat-no" title="statement not covered" > ss = ss.substring(0, phrase.index) + ss.substring(phrase.index + phrase[0].length)</span>
}
// Get remaining space-separated words (if any)
<span class="cstat-no" title="statement not covered" > ss = ss.trim()</span>
<span class="cstat-no" title="statement not covered" > if (ss.length) <span class="cstat-no" title="statement not covered" >words = words.concat(ss.split(/\s+/))</span></span>
<span class="cstat-no" title="statement not covered" > for (var k = <span class="cstat-no" title="statement not covered" >0,</span> kl = <span class="cstat-no" title="statement not covered" >list.items.length;</span> k &lt; kl; k++) {</span>
var item = <span class="cstat-no" title="statement not covered" >list.items[k]</span>
<span class="cstat-no" title="statement not covered" > item.found = false</span>
<span class="cstat-no" title="statement not covered" > if (!words.length) <span class="cstat-no" title="statement not covered" >continue</span></span>
<span class="cstat-no" title="statement not covered" > for (var i = <span class="cstat-no" title="statement not covered" >0,</span> il = <span class="cstat-no" title="statement not covered" >words.length;</span> i &lt; il; i++) {</span>
var word_found = <span class="cstat-no" title="statement not covered" >false</span>
<span class="cstat-no" title="statement not covered" > for (var j = <span class="cstat-no" title="statement not covered" >0,</span> jl = <span class="cstat-no" title="statement not covered" >columns.length;</span> j &lt; jl; j++) {</span>
var values = <span class="cstat-no" title="statement not covered" >item.values(),</span>
column = <span class="cstat-no" title="statement not covered" >columns[j]</span>
<span class="cstat-no" title="statement not covered" > if (values.hasOwnProperty(column) &amp;&amp; values[column] !== undefined &amp;&amp; values[column] !== null) {</span>
var text = <span class="cstat-no" title="statement not covered" >typeof values[column] !== 'string' ? values[column].toString() : values[column]</span>
<span class="cstat-no" title="statement not covered" > if (text.toLowerCase().indexOf(words[i]) !== -1) {</span>
// word found, so no need to check it against any other columns
<span class="cstat-no" title="statement not covered" > word_found = true</span>
<span class="cstat-no" title="statement not covered" > break</span>
}
}
}
// this word not found? no need to check any other words, the item cannot match
<span class="cstat-no" title="statement not covered" > if (!word_found) <span class="cstat-no" title="statement not covered" >break</span></span>
}
<span class="cstat-no" title="statement not covered" > item.found = word_found</span>
}
},
// Removed search.item() and search.values()
reset: <span class="fstat-no" title="function not covered" >fu</span>nction () {
<span class="cstat-no" title="statement not covered" > list.reset.search()</span>
<span class="cstat-no" title="statement not covered" > list.searched = false</span>
},
}
&nbsp;
var searchMethod = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction (str) {</span>
<span class="cstat-no" title="statement not covered" > list.trigger('searchStart')</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > prepare.resetList()</span>
<span class="cstat-no" title="statement not covered" > prepare.setSearchString(str)</span>
<span class="cstat-no" title="statement not covered" > prepare.setOptions(arguments) </span>// str, cols|searchFunction, searchFunction
<span class="cstat-no" title="statement not covered" > prepare.setColumns()</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > if (searchString === '') {</span>
<span class="cstat-no" title="statement not covered" > search.reset()</span>
} else {
<span class="cstat-no" title="statement not covered" > list.searched = true</span>
<span class="cstat-no" title="statement not covered" > if (customSearch) {</span>
<span class="cstat-no" title="statement not covered" > customSearch(searchString, columns)</span>
} else {
<span class="cstat-no" title="statement not covered" > search.list()</span>
}
}
&nbsp;
<span class="cstat-no" title="statement not covered" > list.update()</span>
<span class="cstat-no" title="statement not covered" > list.trigger('searchComplete')</span>
<span class="cstat-no" title="statement not covered" > return list.visibleItems</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > list.handlers.searchStart = list.handlers.searchStart || []</span>
<span class="cstat-no" title="statement not covered" > list.handlers.searchComplete = list.handlers.searchComplete || []</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > list.utils.events.bind(</span>
list.utils.getByClass(list.listContainer, list.searchClass),
'keyup',
list.utils.events.debounce(<span class="fstat-no" title="function not covered" >fu</span>nction (e) {
var target = <span class="cstat-no" title="statement not covered" >e.target || e.srcElement,</span> // IE have srcElement
alreadyCleared = <span class="cstat-no" title="statement not covered" >target.value === '' &amp;&amp; !list.searched</span>
<span class="cstat-no" title="statement not covered" > if (!alreadyCleared) {</span>
// If oninput already have resetted the list, do nothing
<span class="cstat-no" title="statement not covered" > searchMethod(target.value)</span>
}
}, list.searchDelay)
)
&nbsp;
// Used to detect click on HTML5 clear button
<span class="cstat-no" title="statement not covered" > list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', <span class="fstat-no" title="function not covered" >fu</span>nction (e) {</span>
var target = <span class="cstat-no" title="statement not covered" >e.target || e.srcElement</span>
<span class="cstat-no" title="statement not covered" > if (target.value === '') {</span>
<span class="cstat-no" title="statement not covered" > searchMethod('')</span>
}
})
&nbsp;
<span class="cstat-no" title="statement not covered" > return searchMethod</span>
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Nov 28 2020 19:06:38 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

View file

@ -0,0 +1,305 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for sort-listener.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> sort-listener.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>56/56</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90% </span>
<span class="quiet">Branches</span>
<span class='fraction'>27/30</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>6/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>50/50</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">19x</span>
<span class="cline-any cline-yes">19x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">14x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">138x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">43x</span>
<span class="cline-any cline-yes">50x</span>
<span class="cline-any cline-yes">50x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">43x</span>
<span class="cline-any cline-yes">43x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">12x</span>
<span class="cline-any cline-yes">12x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">12x</span>
<span class="cline-any cline-yes">12x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">19x</span>
<span class="cline-any cline-yes">19x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">100x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var getAttribute = require('./utils/get-attribute')
var classes = require('./utils/classes')
var events = require('./utils/events')
var sorter = require('./sorter')
&nbsp;
var getInSensitive = function (btn) {
var insensitive = getAttribute(btn, 'data-insensitive')
if (insensitive === 'false') {
return false
} else {
return true
}
}
var getNextOrder = function (btn) {
var predefinedOrder = getAttribute(btn, 'data-order')
if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {
return predefinedOrder
} else if (classes(btn).has('desc')) {
return 'asc'
} else if (classes(btn).has('asc')) {
return 'desc'
} else {
return 'asc'
}
}
var clearOrder = function (els) {
for (var i = 0, il = els.length; i &lt; il; i++) {
classes(els[i]).remove('asc')
classes(els[i]).remove('desc')
}
}
var setOrder = function (els, valueName, order) {
for (var i = 0, il = els.length; i &lt; il; i++) {
var btn = els[i]
if (getAttribute(btn, 'data-sort') !== valueName) {
classes(btn).remove('asc')
classes(btn).remove('desc')
continue
}
var predefinedOrder = getAttribute(btn, 'data-order')
if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {
if (predefinedOrder == order) {
classes(btn).add(order)
classes(btn).remove(order === 'asc' ? 'desc' : 'asc')
} else {
classes(btn).remove('asc')
classes(btn).remove('desc')
}
} else {
classes(btn).add(order)
classes(btn).remove(order === 'asc' ? 'desc' : 'asc')
}
}
}
&nbsp;
var addSortListeners = function (elements, { items, sortFunction, alphabet, before, after } = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> {
events.bind(elements, 'click', function () {
if (before) before()
var target = arguments[0].currentTarget || <span class="branch-1 cbranch-no" title="branch not covered" >arguments[0].srcElement </span>|| <span class="branch-2 cbranch-no" title="branch not covered" >undefined</span>
var valueName = getAttribute(target, 'data-sort')
var order = getNextOrder(target)
var insensitive = getInSensitive(target)
var options = {
sortFunction,
insensitive,
alphabet,
order,
}
setOrder(elements, valueName, order)
sorter(items, valueName, options)
if (after) after()
})
}
&nbsp;
module.exports = { addSortListeners, getInSensitive, getNextOrder, setOrder, clearOrder }
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Thu Dec 17 2020 00:25:33 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,80 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for sort-listeners.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> sort-listeners.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/0</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Tue Dec 15 2020 22:16:56 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,410 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for sort.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> sort.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/65</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/47</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/61</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >module.exports = <span class="fstat-no" title="function not covered" >fu</span>nction (list) {</span>
var buttons = <span class="cstat-no" title="statement not covered" >{</span>
els: undefined,
clear: <span class="fstat-no" title="function not covered" >fu</span>nction () {
<span class="cstat-no" title="statement not covered" > for (var i = <span class="cstat-no" title="statement not covered" >0,</span> il = <span class="cstat-no" title="statement not covered" >buttons.els.length;</span> i &lt; il; i++) {</span>
<span class="cstat-no" title="statement not covered" > list.utils.classes(buttons.els[i]).remove('asc')</span>
<span class="cstat-no" title="statement not covered" > list.utils.classes(buttons.els[i]).remove('desc')</span>
}
},
getOrder: <span class="fstat-no" title="function not covered" >fu</span>nction (btn) {
var predefinedOrder = <span class="cstat-no" title="statement not covered" >list.utils.getAttribute(btn, 'data-order')</span>
<span class="cstat-no" title="statement not covered" > if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {</span>
<span class="cstat-no" title="statement not covered" > return predefinedOrder</span>
} else <span class="cstat-no" title="statement not covered" >if (list.utils.classes(btn).has('desc')) {</span>
<span class="cstat-no" title="statement not covered" > return 'asc'</span>
} else <span class="cstat-no" title="statement not covered" >if (list.utils.classes(btn).has('asc')) {</span>
<span class="cstat-no" title="statement not covered" > return 'desc'</span>
} else {
<span class="cstat-no" title="statement not covered" > return 'asc'</span>
}
},
getInSensitive: <span class="fstat-no" title="function not covered" >fu</span>nction (btn, options) {
var insensitive = <span class="cstat-no" title="statement not covered" >list.utils.getAttribute(btn, 'data-insensitive')</span>
<span class="cstat-no" title="statement not covered" > if (insensitive === 'false') {</span>
<span class="cstat-no" title="statement not covered" > options.insensitive = false</span>
} else {
<span class="cstat-no" title="statement not covered" > options.insensitive = true</span>
}
},
setOrder: <span class="fstat-no" title="function not covered" >fu</span>nction (options) {
<span class="cstat-no" title="statement not covered" > for (var i = <span class="cstat-no" title="statement not covered" >0,</span> il = <span class="cstat-no" title="statement not covered" >buttons.els.length;</span> i &lt; il; i++) {</span>
var btn = <span class="cstat-no" title="statement not covered" >buttons.els[i]</span>
<span class="cstat-no" title="statement not covered" > if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {</span>
<span class="cstat-no" title="statement not covered" > continue</span>
}
var predefinedOrder = <span class="cstat-no" title="statement not covered" >list.utils.getAttribute(btn, 'data-order')</span>
<span class="cstat-no" title="statement not covered" > if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {</span>
<span class="cstat-no" title="statement not covered" > if (predefinedOrder == options.order) {</span>
<span class="cstat-no" title="statement not covered" > list.utils.classes(btn).add(options.order)</span>
}
} else {
<span class="cstat-no" title="statement not covered" > list.utils.classes(btn).add(options.order)</span>
}
}
},
}
&nbsp;
var sort = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction () {</span>
<span class="cstat-no" title="statement not covered" > list.trigger('sortStart')</span>
var options = <span class="cstat-no" title="statement not covered" >{}</span>
&nbsp;
var target = <span class="cstat-no" title="statement not covered" >arguments[0].currentTarget || arguments[0].srcElement || undefined</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > if (target) {</span>
<span class="cstat-no" title="statement not covered" > options.valueName = list.utils.getAttribute(target, 'data-sort')</span>
<span class="cstat-no" title="statement not covered" > buttons.getInSensitive(target, options)</span>
<span class="cstat-no" title="statement not covered" > options.order = buttons.getOrder(target)</span>
} else {
<span class="cstat-no" title="statement not covered" > options = arguments[1] || options</span>
<span class="cstat-no" title="statement not covered" > options.valueName = arguments[0]</span>
<span class="cstat-no" title="statement not covered" > options.order = options.order || 'asc'</span>
<span class="cstat-no" title="statement not covered" > options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > buttons.clear()</span>
<span class="cstat-no" title="statement not covered" > buttons.setOrder(options)</span>
&nbsp;
// caseInsensitive
// alphabet
var customSortFunction = <span class="cstat-no" title="statement not covered" >options.sortFunction || list.sortFunction || null,</span>
multi = <span class="cstat-no" title="statement not covered" >options.order === 'desc' ? -1 : 1,</span>
sortFunction
&nbsp;
<span class="cstat-no" title="statement not covered" > if (customSortFunction) {</span>
<span class="cstat-no" title="statement not covered" > sortFunction = <span class="fstat-no" title="function not covered" >fu</span>nction (itemA, itemB) {</span>
<span class="cstat-no" title="statement not covered" > return customSortFunction(itemA, itemB, options) * multi</span>
}
} else {
<span class="cstat-no" title="statement not covered" > sortFunction = <span class="fstat-no" title="function not covered" >fu</span>nction (itemA, itemB) {</span>
var naturalSortOptions = <span class="cstat-no" title="statement not covered" >{}</span>
<span class="cstat-no" title="statement not covered" > naturalSortOptions.alphabet = list.alphabet || options.alphabet || undefined</span>
<span class="cstat-no" title="statement not covered" > if (!naturalSortOptions.alphabet &amp;&amp; options.insensitive) {</span>
<span class="cstat-no" title="statement not covered" > naturalSortOptions.caseInsensitive = true</span>
}
<span class="cstat-no" title="statement not covered" > return (</span>
list.utils.naturalSort(
'' + itemA.values()[options.valueName],
'' + itemB.values()[options.valueName],
naturalSortOptions
) * multi
)
}
}
&nbsp;
<span class="cstat-no" title="statement not covered" > list.items.sort(sortFunction)</span>
<span class="cstat-no" title="statement not covered" > list.update()</span>
<span class="cstat-no" title="statement not covered" > list.trigger('sortComplete')</span>
}
&nbsp;
// Add handlers
<span class="cstat-no" title="statement not covered" > list.handlers.sortStart = list.handlers.sortStart || []</span>
<span class="cstat-no" title="statement not covered" > list.handlers.sortComplete = list.handlers.sortComplete || []</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > buttons.els = list.utils.getByClass(list.listContainer, list.sortClass)</span>
<span class="cstat-no" title="statement not covered" > list.utils.events.bind(buttons.els, 'click', sort)</span>
<span class="cstat-no" title="statement not covered" > list.on('searchStart', buttons.clear)</span>
<span class="cstat-no" title="statement not covered" > list.on('filterStart', buttons.clear)</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > return sort</span>
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Thu Dec 17 2020 00:01:06 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,170 @@
/* eslint-disable */
var addSorting = (function() {
'use strict';
var cols,
currentSort = {
index: 0,
desc: false
};
// returns the summary table element
function getTable() {
return document.querySelector('.coverage-summary');
}
// returns the thead element of the summary table
function getTableHeader() {
return getTable().querySelector('thead tr');
}
// returns the tbody element of the summary table
function getTableBody() {
return getTable().querySelector('tbody');
}
// returns the th element for nth column
function getNthColumn(n) {
return getTableHeader().querySelectorAll('th')[n];
}
// loads all columns
function loadColumns() {
var colNodes = getTableHeader().querySelectorAll('th'),
colNode,
cols = [],
col,
i;
for (i = 0; i < colNodes.length; i += 1) {
colNode = colNodes[i];
col = {
key: colNode.getAttribute('data-col'),
sortable: !colNode.getAttribute('data-nosort'),
type: colNode.getAttribute('data-type') || 'string'
};
cols.push(col);
if (col.sortable) {
col.defaultDescSort = col.type === 'number';
colNode.innerHTML =
colNode.innerHTML + '<span class="sorter"></span>';
}
}
return cols;
}
// attaches a data attribute to every tr element with an object
// of data values keyed by column name
function loadRowData(tableRow) {
var tableCols = tableRow.querySelectorAll('td'),
colNode,
col,
data = {},
i,
val;
for (i = 0; i < tableCols.length; i += 1) {
colNode = tableCols[i];
col = cols[i];
val = colNode.getAttribute('data-value');
if (col.type === 'number') {
val = Number(val);
}
data[col.key] = val;
}
return data;
}
// loads all row data
function loadData() {
var rows = getTableBody().querySelectorAll('tr'),
i;
for (i = 0; i < rows.length; i += 1) {
rows[i].data = loadRowData(rows[i]);
}
}
// sorts the table using the data for the ith column
function sortByIndex(index, desc) {
var key = cols[index].key,
sorter = function(a, b) {
a = a.data[key];
b = b.data[key];
return a < b ? -1 : a > b ? 1 : 0;
},
finalSorter = sorter,
tableBody = document.querySelector('.coverage-summary tbody'),
rowNodes = tableBody.querySelectorAll('tr'),
rows = [],
i;
if (desc) {
finalSorter = function(a, b) {
return -1 * sorter(a, b);
};
}
for (i = 0; i < rowNodes.length; i += 1) {
rows.push(rowNodes[i]);
tableBody.removeChild(rowNodes[i]);
}
rows.sort(finalSorter);
for (i = 0; i < rows.length; i += 1) {
tableBody.appendChild(rows[i]);
}
}
// removes sort indicators for current column being sorted
function removeSortIndicators() {
var col = getNthColumn(currentSort.index),
cls = col.className;
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
col.className = cls;
}
// adds sort indicators for current column being sorted
function addSortIndicators() {
getNthColumn(currentSort.index).className += currentSort.desc
? ' sorted-desc'
: ' sorted';
}
// adds event listeners for all sorter widgets
function enableUI() {
var i,
el,
ithSorter = function ithSorter(i) {
var col = cols[i];
return function() {
var desc = col.defaultDescSort;
if (currentSort.index === i) {
desc = !currentSort.desc;
}
sortByIndex(i, desc);
removeSortIndicators();
currentSort.index = i;
currentSort.desc = desc;
addSortIndicators();
};
};
for (i = 0; i < cols.length; i += 1) {
if (cols[i].sortable) {
// add the click event handler on the th so users
// dont have to click on those tiny arrows
el = getNthColumn(i).querySelector('.sorter').parentElement;
if (el.addEventListener) {
el.addEventListener('click', ithSorter(i));
} else {
el.attachEvent('onclick', ithSorter(i));
}
}
}
}
// adds sorting functionality to the UI
return function() {
if (!getTable()) {
return;
}
cols = loadColumns();
loadData();
addSortIndicators();
enableUI();
};
})();
window.addEventListener('load', addSorting);

View file

@ -0,0 +1,167 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for sorter.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> sorter.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>14/14</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>14/14</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">19x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">19x</span>
<span class="cline-any cline-yes">56x</span>
<span class="cline-any cline-yes">56x</span>
<span class="cline-any cline-yes">56x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">56x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">49x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">51x</span>
<span class="cline-any cline-yes">462x</span>
<span class="cline-any cline-yes">462x</span>
<span class="cline-any cline-yes">386x</span>
<span class="cline-any cline-yes">372x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">462x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var naturalSort = require('string-natural-compare')
&nbsp;
module.exports = (items, column, options = {}) =&gt; {
const { sortFunction, order, alphabet, insensitive } = options
const caseSensitive = insensitive !== false
const multi = order === 'desc' ? -1 : 1
&nbsp;
if (sortFunction) {
return items.sort(function (itemA, itemB) {
return (
sortFunction(itemA, itemB, {
valueName: column,
alphabet,
caseSensitive,
}) * multi
)
})
} else {
return items.sort(function (itemA, itemB) {
const options = { alphabet }
if (!alphabet) {
if (caseSensitive) {
options.caseInsensitive = true
}
}
return naturalSort('' + itemA.values()[column], '' + itemB.values()[column], options) * multi
})
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Thu Dec 17 2020 00:29:41 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,128 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/add-async.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> add-async.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>11/11</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>11/11</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (list) {
var addAsync = function (values, callback, items) {
var valuesToAdd = values.splice(0, 50)
items = items || []
items = items.concat(list.add(valuesToAdd))
if (values.length &gt; 0) {
setTimeout(function () {
addAsync(values, callback, items)
}, 1)
} else {
list.update()
callback(items)
}
}
return addAsync
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,164 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/filter.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> filter.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>21/21</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>19/19</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">47x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-yes">122x</span>
<span class="cline-any cline-yes">122x</span>
<span class="cline-any cline-yes">70x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">52x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (list) {
// Add handlers
list.handlers.filterStart = list.handlers.filterStart || []
list.handlers.filterComplete = list.handlers.filterComplete || []
&nbsp;
return function (filterFunction) {
list.trigger('filterStart')
list.i = 1 // Reset paging
list.reset.filter()
if (filterFunction === undefined) {
list.filtered = false
} else {
list.filtered = true
var is = list.items
for (var i = 0, il = is.length; i &lt; il; i++) {
var item = is[i]
if (filterFunction(item)) {
item.filtered = true
} else {
item.filtered = false
}
}
}
list.update()
list.trigger('filterComplete')
return list.visibleItems
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,290 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/fuzzy-search.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> fuzzy-search.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>37/37</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">78.57% </span>
<span class="quiet">Branches</span>
<span class='fraction'>11/14</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>6/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>32/32</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">50x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">50x</span>
<span class="cline-any cline-yes">50x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">49x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">50x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">49x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var classes = require('./utils/classes'),
events = require('./utils/events'),
extend = require('./utils/extend'),
toString = require('./utils/to-string'),
getByClass = require('./utils/get-by-class'),
fuzzy = require('./utils/fuzzy')
&nbsp;
module.exports = function (list, options) {
options = options || {}
&nbsp;
options = extend(
{
location: 0,
distance: 100,
threshold: 0.4,
multiSearch: true,
searchClass: 'fuzzy-search',
},
options
)
&nbsp;
var fuzzySearch = {
search: function (searchString, columns) {
// Substract arguments from the searchString or put searchString as only argument
var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : <span class="branch-1 cbranch-no" title="branch not covered" >[searchString]</span>
&nbsp;
for (var k = 0, kl = list.items.length; k &lt; kl; k++) {
fuzzySearch.item(list.items[k], columns, searchArguments)
}
},
item: function (item, columns, searchArguments) {
var found = true
for (var i = 0; i &lt; searchArguments.length; i++) {
var foundArgument = false
for (var j = 0, jl = columns.length; j &lt; jl; j++) {
if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) {
foundArgument = true
}
}
if (!foundArgument) {
found = false
}
}
item.found = found
},
values: function (values, value, searchArgument) {
<span class="missing-if-branch" title="else path not taken" >E</span>if (values.hasOwnProperty(value)) {
var text = toString(values[value]).toLowerCase()
&nbsp;
if (fuzzy(text, searchArgument, options)) {
return true
}
}
return false
},
}
&nbsp;
events.bind(
getByClass(list.listContainer, options.searchClass),
'keyup',
list.utils.events.debounce(function (e) {
var target = e.target || <span class="branch-1 cbranch-no" title="branch not covered" >e.srcElement </span>// IE have srcElement
list.search(target.value, fuzzySearch.search)
}, list.searchDelay)
)
&nbsp;
return function (str, columns) {
list.search(str, columns, fuzzySearch.search)
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,246 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> src</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">97.51% </span>
<span class="quiet">Statements</span>
<span class='fraction'>627/643</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">91.21% </span>
<span class="quiet">Branches</span>
<span class='fraction'>280/307</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">97.83% </span>
<span class="quiet">Functions</span>
<span class='fraction'>90/92</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">97.8% </span>
<span class="quiet">Lines</span>
<span class='fraction'>577/590</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="add-async.js"><a href="add-async.js.html">add-async.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="11" class="abs high">11/11</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="11" class="abs high">11/11</td>
</tr>
<tr>
<td class="file high" data-value="filter.js"><a href="filter.js.html">filter.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="21" class="abs high">21/21</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="19" class="abs high">19/19</td>
</tr>
<tr>
<td class="file high" data-value="fuzzy-search.js"><a href="fuzzy-search.js.html">fuzzy-search.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="37" class="abs high">37/37</td>
<td data-value="78.57" class="pct medium">78.57%</td>
<td data-value="14" class="abs medium">11/14</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="32" class="abs high">32/32</td>
</tr>
<tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="98.83" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 98%"></div><div class="cover-empty" style="width: 2%"></div></div>
</td>
<td data-value="98.83" class="pct high">98.83%</td>
<td data-value="171" class="abs high">169/171</td>
<td data-value="94.59" class="pct high">94.59%</td>
<td data-value="37" class="abs high">35/37</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="19" class="abs high">19/19</td>
<td data-value="98.75" class="pct high">98.75%</td>
<td data-value="160" class="abs high">158/160</td>
</tr>
<tr>
<td class="file high" data-value="item.js"><a href="item.js.html">item.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="30" class="abs high">30/30</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="24" class="abs high">24/24</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="30" class="abs high">30/30</td>
</tr>
<tr>
<td class="file high" data-value="pagination.js"><a href="pagination.js.html">pagination.js</a></td>
<td data-value="90.91" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 90%"></div><div class="cover-empty" style="width: 10%"></div></div>
</td>
<td data-value="90.91" class="pct high">90.91%</td>
<td data-value="55" class="abs high">50/55</td>
<td data-value="90.7" class="pct high">90.7%</td>
<td data-value="43" class="abs high">39/43</td>
<td data-value="91.67" class="pct high">91.67%</td>
<td data-value="12" class="abs high">11/12</td>
<td data-value="90.74" class="pct high">90.74%</td>
<td data-value="54" class="abs high">49/54</td>
</tr>
<tr>
<td class="file high" data-value="parse.js"><a href="parse.js.html">parse.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="31" class="abs high">31/31</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="27" class="abs high">27/27</td>
</tr>
<tr>
<td class="file high" data-value="search.js"><a href="search.js.html">search.js</a></td>
<td data-value="94.25" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 94%"></div><div class="cover-empty" style="width: 6%"></div></div>
</td>
<td data-value="94.25" class="pct high">94.25%</td>
<td data-value="87" class="abs high">82/87</td>
<td data-value="81.63" class="pct high">81.63%</td>
<td data-value="49" class="abs high">40/49</td>
<td data-value="90.91" class="pct high">90.91%</td>
<td data-value="11" class="abs high">10/11</td>
<td data-value="96.1" class="pct high">96.1%</td>
<td data-value="77" class="abs high">74/77</td>
</tr>
<tr>
<td class="file high" data-value="sort.js"><a href="sort.js.html">sort.js</a></td>
<td data-value="96.92" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 96%"></div><div class="cover-empty" style="width: 4%"></div></div>
</td>
<td data-value="96.92" class="pct high">96.92%</td>
<td data-value="65" class="abs high">63/65</td>
<td data-value="95.74" class="pct high">95.74%</td>
<td data-value="47" class="abs high">45/47</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="96.72" class="pct high">96.72%</td>
<td data-value="61" class="abs high">59/61</td>
</tr>
<tr>
<td class="file high" data-value="templater.js"><a href="templater.js.html">templater.js</a></td>
<td data-value="98.52" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 98%"></div><div class="cover-empty" style="width: 2%"></div></div>
</td>
<td data-value="98.52" class="pct high">98.52%</td>
<td data-value="135" class="abs high">133/135</td>
<td data-value="90.41" class="pct high">90.41%</td>
<td data-value="73" class="abs high">66/73</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="17" class="abs high">17/17</td>
<td data-value="99.16" class="pct high">99.16%</td>
<td data-value="119" class="abs high">118/119</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,869 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">98.83% </span>
<span class="quiet">Statements</span>
<span class='fraction'>169/171</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">94.59% </span>
<span class="quiet">Branches</span>
<span class='fraction'>35/37</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>19/19</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">98.75% </span>
<span class="quiet">Lines</span>
<span class='fraction'>158/160</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a>
<a name='L138'></a><a href='#L138'>138</a>
<a name='L139'></a><a href='#L139'>139</a>
<a name='L140'></a><a href='#L140'>140</a>
<a name='L141'></a><a href='#L141'>141</a>
<a name='L142'></a><a href='#L142'>142</a>
<a name='L143'></a><a href='#L143'>143</a>
<a name='L144'></a><a href='#L144'>144</a>
<a name='L145'></a><a href='#L145'>145</a>
<a name='L146'></a><a href='#L146'>146</a>
<a name='L147'></a><a href='#L147'>147</a>
<a name='L148'></a><a href='#L148'>148</a>
<a name='L149'></a><a href='#L149'>149</a>
<a name='L150'></a><a href='#L150'>150</a>
<a name='L151'></a><a href='#L151'>151</a>
<a name='L152'></a><a href='#L152'>152</a>
<a name='L153'></a><a href='#L153'>153</a>
<a name='L154'></a><a href='#L154'>154</a>
<a name='L155'></a><a href='#L155'>155</a>
<a name='L156'></a><a href='#L156'>156</a>
<a name='L157'></a><a href='#L157'>157</a>
<a name='L158'></a><a href='#L158'>158</a>
<a name='L159'></a><a href='#L159'>159</a>
<a name='L160'></a><a href='#L160'>160</a>
<a name='L161'></a><a href='#L161'>161</a>
<a name='L162'></a><a href='#L162'>162</a>
<a name='L163'></a><a href='#L163'>163</a>
<a name='L164'></a><a href='#L164'>164</a>
<a name='L165'></a><a href='#L165'>165</a>
<a name='L166'></a><a href='#L166'>166</a>
<a name='L167'></a><a href='#L167'>167</a>
<a name='L168'></a><a href='#L168'>168</a>
<a name='L169'></a><a href='#L169'>169</a>
<a name='L170'></a><a href='#L170'>170</a>
<a name='L171'></a><a href='#L171'>171</a>
<a name='L172'></a><a href='#L172'>172</a>
<a name='L173'></a><a href='#L173'>173</a>
<a name='L174'></a><a href='#L174'>174</a>
<a name='L175'></a><a href='#L175'>175</a>
<a name='L176'></a><a href='#L176'>176</a>
<a name='L177'></a><a href='#L177'>177</a>
<a name='L178'></a><a href='#L178'>178</a>
<a name='L179'></a><a href='#L179'>179</a>
<a name='L180'></a><a href='#L180'>180</a>
<a name='L181'></a><a href='#L181'>181</a>
<a name='L182'></a><a href='#L182'>182</a>
<a name='L183'></a><a href='#L183'>183</a>
<a name='L184'></a><a href='#L184'>184</a>
<a name='L185'></a><a href='#L185'>185</a>
<a name='L186'></a><a href='#L186'>186</a>
<a name='L187'></a><a href='#L187'>187</a>
<a name='L188'></a><a href='#L188'>188</a>
<a name='L189'></a><a href='#L189'>189</a>
<a name='L190'></a><a href='#L190'>190</a>
<a name='L191'></a><a href='#L191'>191</a>
<a name='L192'></a><a href='#L192'>192</a>
<a name='L193'></a><a href='#L193'>193</a>
<a name='L194'></a><a href='#L194'>194</a>
<a name='L195'></a><a href='#L195'>195</a>
<a name='L196'></a><a href='#L196'>196</a>
<a name='L197'></a><a href='#L197'>197</a>
<a name='L198'></a><a href='#L198'>198</a>
<a name='L199'></a><a href='#L199'>199</a>
<a name='L200'></a><a href='#L200'>200</a>
<a name='L201'></a><a href='#L201'>201</a>
<a name='L202'></a><a href='#L202'>202</a>
<a name='L203'></a><a href='#L203'>203</a>
<a name='L204'></a><a href='#L204'>204</a>
<a name='L205'></a><a href='#L205'>205</a>
<a name='L206'></a><a href='#L206'>206</a>
<a name='L207'></a><a href='#L207'>207</a>
<a name='L208'></a><a href='#L208'>208</a>
<a name='L209'></a><a href='#L209'>209</a>
<a name='L210'></a><a href='#L210'>210</a>
<a name='L211'></a><a href='#L211'>211</a>
<a name='L212'></a><a href='#L212'>212</a>
<a name='L213'></a><a href='#L213'>213</a>
<a name='L214'></a><a href='#L214'>214</a>
<a name='L215'></a><a href='#L215'>215</a>
<a name='L216'></a><a href='#L216'>216</a>
<a name='L217'></a><a href='#L217'>217</a>
<a name='L218'></a><a href='#L218'>218</a>
<a name='L219'></a><a href='#L219'>219</a>
<a name='L220'></a><a href='#L220'>220</a>
<a name='L221'></a><a href='#L221'>221</a>
<a name='L222'></a><a href='#L222'>222</a>
<a name='L223'></a><a href='#L223'>223</a>
<a name='L224'></a><a href='#L224'>224</a>
<a name='L225'></a><a href='#L225'>225</a>
<a name='L226'></a><a href='#L226'>226</a>
<a name='L227'></a><a href='#L227'>227</a>
<a name='L228'></a><a href='#L228'>228</a>
<a name='L229'></a><a href='#L229'>229</a>
<a name='L230'></a><a href='#L230'>230</a>
<a name='L231'></a><a href='#L231'>231</a>
<a name='L232'></a><a href='#L232'>232</a>
<a name='L233'></a><a href='#L233'>233</a>
<a name='L234'></a><a href='#L234'>234</a>
<a name='L235'></a><a href='#L235'>235</a>
<a name='L236'></a><a href='#L236'>236</a>
<a name='L237'></a><a href='#L237'>237</a>
<a name='L238'></a><a href='#L238'>238</a>
<a name='L239'></a><a href='#L239'>239</a>
<a name='L240'></a><a href='#L240'>240</a>
<a name='L241'></a><a href='#L241'>241</a>
<a name='L242'></a><a href='#L242'>242</a>
<a name='L243'></a><a href='#L243'>243</a>
<a name='L244'></a><a href='#L244'>244</a>
<a name='L245'></a><a href='#L245'>245</a>
<a name='L246'></a><a href='#L246'>246</a>
<a name='L247'></a><a href='#L247'>247</a>
<a name='L248'></a><a href='#L248'>248</a>
<a name='L249'></a><a href='#L249'>249</a>
<a name='L250'></a><a href='#L250'>250</a>
<a name='L251'></a><a href='#L251'>251</a>
<a name='L252'></a><a href='#L252'>252</a>
<a name='L253'></a><a href='#L253'>253</a>
<a name='L254'></a><a href='#L254'>254</a>
<a name='L255'></a><a href='#L255'>255</a>
<a name='L256'></a><a href='#L256'>256</a>
<a name='L257'></a><a href='#L257'>257</a>
<a name='L258'></a><a href='#L258'>258</a>
<a name='L259'></a><a href='#L259'>259</a>
<a name='L260'></a><a href='#L260'>260</a>
<a name='L261'></a><a href='#L261'>261</a>
<a name='L262'></a><a href='#L262'>262</a>
<a name='L263'></a><a href='#L263'>263</a>
<a name='L264'></a><a href='#L264'>264</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">720x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">71x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">238x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">238x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">236x</span>
<span class="cline-any cline-yes">236x</span>
<span class="cline-any cline-yes">236x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">236x</span>
<span class="cline-any cline-yes">717x</span>
<span class="cline-any cline-yes">717x</span>
<span class="cline-any cline-yes">717x</span>
<span class="cline-any cline-yes">717x</span>
<span class="cline-any cline-yes">717x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">236x</span>
<span class="cline-any cline-yes">236x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">79x</span>
<span class="cline-any cline-yes">79x</span>
<span class="cline-any cline-yes">79x</span>
<span class="cline-any cline-yes">79x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">251x</span>
<span class="cline-any cline-yes">251x</span>
<span class="cline-any cline-yes">1482x</span>
<span class="cline-any cline-yes">1482x</span>
<span class="cline-any cline-yes">251x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">251x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">139x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">37x</span>
<span class="cline-any cline-yes">37x</span>
<span class="cline-any cline-yes">37x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">213x</span>
<span class="cline-any cline-yes">213x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">937x</span>
<span class="cline-any cline-yes">937x</span>
<span class="cline-any cline-yes">198x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">937x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">329x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-yes">75x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">587x</span>
<span class="cline-any cline-yes">587x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">587x</span>
<span class="cline-any cline-yes">587x</span>
<span class="cline-any cline-yes">587x</span>
<span class="cline-any cline-yes">587x</span>
<span class="cline-any cline-yes">3379x</span>
<span class="cline-any cline-yes">2462x</span>
<span class="cline-any cline-yes">2462x</span>
<span class="cline-any cline-yes">2462x</span>
<span class="cline-any cline-yes">917x</span>
<span class="cline-any cline-yes">597x</span>
<span class="cline-any cline-yes">597x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">320x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">587x</span>
<span class="cline-any cline-yes">587x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var naturalSort = require('string-natural-compare'),
getByClass = require('./utils/get-by-class'),
extend = require('./utils/extend'),
indexOf = require('./utils/index-of'),
events = require('./utils/events'),
toString = require('./utils/to-string'),
classes = require('./utils/classes'),
getAttribute = require('./utils/get-attribute'),
toArray = require('./utils/to-array')
&nbsp;
module.exports = function (id, options, values) {
var self = this,
init,
Item = require('./item')(self),
addAsync = require('./add-async')(self),
initPagination = require('./pagination')(self)
&nbsp;
init = {
start: function () {
self.listClass = 'list'
self.searchClass = 'search'
self.sortClass = 'sort'
self.page = 10000
self.i = 1
self.items = []
self.visibleItems = []
self.matchingItems = []
self.searched = false
self.filtered = false
self.searchColumns = undefined
self.searchDelay = 0
self.handlers = { updated: [] }
self.valueNames = []
self.utils = {
getByClass: getByClass,
extend: extend,
indexOf: indexOf,
events: events,
toString: toString,
naturalSort: naturalSort,
classes: classes,
getAttribute: getAttribute,
toArray: toArray,
}
&nbsp;
self.utils.extend(self, options)
&nbsp;
self.listContainer = typeof id === 'string' ? document.getElementById(id) : id
<span class="missing-if-branch" title="if path not taken" >I</span>if (!self.listContainer) {
<span class="cstat-no" title="statement not covered" > return</span>
}
self.list = getByClass(self.listContainer, self.listClass, true)
&nbsp;
self.parse = require('./parse')(self)
self.templater = require('./templater')(self)
self.search = require('./search')(self)
self.filter = require('./filter')(self)
self.sort = require('./sort')(self)
self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch)
&nbsp;
this.handlers()
this.items()
this.pagination()
&nbsp;
self.update()
},
handlers: function () {
for (var handler in self.handlers) {
if (self[handler] &amp;&amp; self.handlers.hasOwnProperty(handler)) {
self.on(handler, self[handler])
}
}
},
items: function () {
self.parse(self.list)
if (values !== undefined) {
self.add(values)
}
},
pagination: function () {
if (options.pagination !== undefined) {
if (options.pagination === true) {
options.pagination = [{}]
}
if (options.pagination[0] === undefined) {
options.pagination = [options.pagination]
}
for (var i = 0, il = options.pagination.length; i &lt; il; i++) {
initPagination(options.pagination[i])
}
}
},
}
&nbsp;
/*
* Re-parse the List, use if html have changed
*/
this.reIndex = function () {
self.items = []
self.visibleItems = []
self.matchingItems = []
self.searched = false
self.filtered = false
self.parse(self.list)
}
&nbsp;
this.toJSON = function () {
var json = []
for (var i = 0, il = self.items.length; i &lt; il; i++) {
json.push(self.items[i].values())
}
return json
}
&nbsp;
/*
* Add object to list
*/
this.add = function (values, callback) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (values.length === 0) {
<span class="cstat-no" title="statement not covered" > return</span>
}
if (callback) {
addAsync(values.slice(0), callback)
return
}
var added = [],
notCreate = false
if (values[0] === undefined) {
values = [values]
}
for (var i = 0, il = values.length; i &lt; il; i++) {
var item = null
notCreate = self.items.length &gt; self.page ? true : false
item = new Item(values[i], undefined, notCreate)
self.items.push(item)
added.push(item)
}
self.update()
return added
}
&nbsp;
this.show = function (i, page) {
this.i = i
this.page = page
self.update()
return self
}
&nbsp;
/* Removes object from list.
* Loops through the list and removes objects where
* property "valuename" === value
*/
this.remove = function (valueName, value, options) {
var found = 0
for (var i = 0, il = self.items.length; i &lt; il; i++) {
if (self.items[i].values()[valueName] == value) {
self.templater.remove(self.items[i], options)
self.items.splice(i, 1)
il--
i--
found++
}
}
self.update()
return found
}
&nbsp;
/* Gets the objects in the list which
* property "valueName" === value
*/
this.get = function (valueName, value) {
var matchedItems = []
for (var i = 0, il = self.items.length; i &lt; il; i++) {
var item = self.items[i]
if (item.values()[valueName] == value) {
matchedItems.push(item)
}
}
return matchedItems
}
&nbsp;
/*
* Get size of the list
*/
this.size = function () {
return self.items.length
}
&nbsp;
/*
* Removes all items from the list
*/
this.clear = function () {
self.templater.clear()
self.items = []
return self
}
&nbsp;
this.on = function (event, callback) {
self.handlers[event].push(callback)
return self
}
&nbsp;
this.off = function (event, callback) {
var e = self.handlers[event]
var index = indexOf(e, callback)
if (index &gt; -1) {
e.splice(index, 1)
}
return self
}
&nbsp;
this.trigger = function (event) {
var i = self.handlers[event].length
while (i--) {
self.handlers[event][i](self)
}
return self
}
&nbsp;
this.reset = {
filter: function () {
var is = self.items,
il = is.length
while (il--) {
is[il].filtered = false
}
return self
},
search: function () {
var is = self.items,
il = is.length
while (il--) {
is[il].found = false
}
return self
},
}
&nbsp;
this.update = function () {
var is = self.items,
il = is.length
&nbsp;
self.visibleItems = []
self.matchingItems = []
self.templater.clear()
for (var i = 0; i &lt; il; i++) {
if (is[i].matching() &amp;&amp; self.matchingItems.length + 1 &gt;= self.i &amp;&amp; self.visibleItems.length &lt; self.page) {
is[i].show()
self.visibleItems.push(is[i])
self.matchingItems.push(is[i])
} else if (is[i].matching()) {
self.matchingItems.push(is[i])
is[i].hide()
} else {
is[i].hide()
}
}
self.trigger('updated')
return self
}
&nbsp;
init.start()
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,260 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/item.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> item.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>30/30</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>24/24</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>30/30</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">182x</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-yes">717x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">657x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">190x</span>
<span class="cline-any cline-yes">190x</span>
<span class="cline-any cline-yes">190x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-yes">6167x</span>
<span class="cline-any cline-yes">1015x</span>
<span class="cline-any cline-yes">1594x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1015x</span>
<span class="cline-any cline-yes">955x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5152x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-yes">2463x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-yes">919x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-yes">4350x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-yes">92x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">907x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (list) {
return function (initValues, element, notCreate) {
var item = this
&nbsp;
this._values = {}
&nbsp;
this.found = false // Show if list.searched == true and this.found == true
this.filtered = false // Show if list.filtered == true and this.filtered == true
&nbsp;
var init = function (initValues, element, notCreate) {
if (element === undefined) {
if (notCreate) {
item.values(initValues, notCreate)
} else {
item.values(initValues)
}
} else {
item.elm = element
var values = list.templater.get(item, initValues)
item.values(values)
}
}
&nbsp;
this.values = function (newValues, notCreate) {
if (newValues !== undefined) {
for (var name in newValues) {
item._values[name] = newValues[name]
}
if (notCreate !== true) {
list.templater.set(item, item.values())
}
} else {
return item._values
}
}
&nbsp;
this.show = function () {
list.templater.show(item)
}
&nbsp;
this.hide = function () {
list.templater.hide(item)
}
&nbsp;
this.matching = function () {
return (
(list.filtered &amp;&amp; list.searched &amp;&amp; item.found &amp;&amp; item.filtered) ||
(list.filtered &amp;&amp; !list.searched &amp;&amp; item.filtered) ||
(!list.filtered &amp;&amp; list.searched &amp;&amp; item.found) ||
(!list.filtered &amp;&amp; !list.searched)
)
}
&nbsp;
this.visible = function () {
return item.elm &amp;&amp; item.elm.parentNode == list.list ? true : false
}
&nbsp;
init(initValues, element, notCreate)
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,404 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/pagination.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> pagination.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">90.91% </span>
<span class="quiet">Statements</span>
<span class='fraction'>50/55</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90.7% </span>
<span class="quiet">Branches</span>
<span class='fraction'>39/43</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">91.67% </span>
<span class="quiet">Functions</span>
<span class='fraction'>11/12</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90.74% </span>
<span class="quiet">Lines</span>
<span class='fraction'>49/54</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">234x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">234x</span>
<span class="cline-any cline-yes">95x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">95x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">95x</span>
<span class="cline-any cline-yes">95x</span>
<span class="cline-any cline-yes">139x</span>
<span class="cline-any cline-yes">30x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">30x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">234x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">234x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">249x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">239x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">139x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">139x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">124x</span>
<span class="cline-any cline-yes">39x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">85x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var classes = require('./utils/classes'),
events = require('./utils/events'),
List = require('./index')
&nbsp;
module.exports = function (list) {
var isHidden = false
&nbsp;
var refresh = function (pagingList, options) {
if (list.page &lt; 1) {
list.listContainer.style.display = 'none'
isHidden = true
return
} else if (isHidden) {
list.listContainer.style.display = 'block'
}
&nbsp;
var item,
l = list.matchingItems.length,
index = list.i,
page = list.page,
pages = Math.ceil(l / page),
currentPage = Math.ceil(index / page),
innerWindow = options.innerWindow || 2,
left = options.left || options.outerWindow || 0,
right = options.right || options.outerWindow || 0
&nbsp;
right = pages - right
pagingList.clear()
for (var i = 1; i &lt;= pages; i++) {
var className = currentPage === i ? 'active' : ''
&nbsp;
//console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);
&nbsp;
if (is.number(i, left, right, currentPage, innerWindow)) {
item = pagingList.add({
page: i,
dotted: false,
})[0]
if (className) {
classes(item.elm).add(className)
}
item.elm.firstChild.setAttribute('data-i', i)
item.elm.firstChild.setAttribute('data-page', page)
} else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {
item = pagingList.add({
page: '...',
dotted: true,
})[0]
classes(item.elm).add('disabled')
}
}
}
&nbsp;
var is = {
number: function (i, left, right, currentPage, innerWindow) {
return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow)
},
left: function (i, left) {
return i &lt;= left
},
right: function (i, right) {
return i &gt; right
},
innerWindow: function (i, currentPage, innerWindow) {
return i &gt;= currentPage - innerWindow &amp;&amp; i &lt;= currentPage + innerWindow
},
dotted: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {
return (
this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) ||
this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)
)
},
dottedLeft: function (pagingList, i, left, right, currentPage, innerWindow) {
return i == left + 1 &amp;&amp; !this.innerWindow(i, currentPage, innerWindow) &amp;&amp; !this.right(i, right)
},
dottedRight: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {
if (pagingList.items[currentPageItem - 1].values().dotted) {
return false
} else {
return i == right &amp;&amp; !this.innerWindow(i, currentPage, innerWindow) &amp;&amp; !this.right(i, right)
}
},
}
&nbsp;
return function (options) {
var pagingList = new List(list.listContainer.id, {
listClass: options.paginationClass || 'pagination',
item: options.item || "&lt;li&gt;&lt;a class='page' href='#'&gt;&lt;/a&gt;&lt;/li&gt;",
valueNames: ['page', 'dotted'],
searchClass: 'pagination-search-that-is-not-supposed-to-exist',
sortClass: 'pagination-sort-that-is-not-supposed-to-exist',
})
&nbsp;
events.bind(pagingList.listContainer, 'click', <span class="fstat-no" title="function not covered" >fu</span>nction (e) {
var target = <span class="cstat-no" title="statement not covered" >e.target || e.srcElement,</span>
page = <span class="cstat-no" title="statement not covered" >list.utils.getAttribute(target, 'data-page'),</span>
i = <span class="cstat-no" title="statement not covered" >list.utils.getAttribute(target, 'data-i')</span>
<span class="cstat-no" title="statement not covered" > if (i) {</span>
<span class="cstat-no" title="statement not covered" > list.show((i - 1) * page + 1, page)</span>
}
})
&nbsp;
list.on('updated', function () {
refresh(pagingList, options)
})
refresh(pagingList, options)
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,218 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/parse.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> parse.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>31/31</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>6/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>27/27</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">312x</span>
<span class="cline-any cline-yes">190x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">94x</span>
<span class="cline-any cline-yes">190x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (list) {
var Item = require('./item')(list)
&nbsp;
var getChildren = function (parent) {
var nodes = parent.childNodes,
items = []
for (var i = 0, il = nodes.length; i &lt; il; i++) {
// Only textnodes have a data attribute
if (nodes[i].data === undefined) {
items.push(nodes[i])
}
}
return items
}
&nbsp;
var parse = function (itemElements, valueNames) {
for (var i = 0, il = itemElements.length; i &lt; il; i++) {
list.items.push(new Item(valueNames, itemElements[i]))
}
}
var parseAsync = function (itemElements, valueNames) {
var itemsToIndex = itemElements.splice(0, 50) // TODO: If &lt; 100 items, what happens in IE etc?
parse(itemsToIndex, valueNames)
if (itemElements.length &gt; 0) {
setTimeout(function () {
parseAsync(itemElements, valueNames)
}, 1)
} else {
list.update()
list.trigger('parseComplete')
}
}
&nbsp;
list.handlers.parseComplete = list.handlers.parseComplete || []
&nbsp;
return function () {
var itemsToIndex = getChildren(list.list),
valueNames = list.valueNames
&nbsp;
if (list.indexAsync) {
parseAsync(itemsToIndex, valueNames)
} else {
parse(itemsToIndex, valueNames)
}
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,488 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/search.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> search.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">94.25% </span>
<span class="quiet">Statements</span>
<span class='fraction'>82/87</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">81.63% </span>
<span class="quiet">Branches</span>
<span class='fraction'>40/49</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90.91% </span>
<span class="quiet">Functions</span>
<span class='fraction'>10/11</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">96.1% </span>
<span class="quiet">Lines</span>
<span class='fraction'>74/77</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">66x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">63x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">59x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">63x</span>
<span class="cline-any cline-yes">63x</span>
<span class="cline-any cline-yes">138x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">63x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">40x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">40x</span>
<span class="cline-any cline-yes">40x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">40x</span>
<span class="cline-any cline-yes">40x</span>
<span class="cline-any cline-yes">40x</span>
<span class="cline-any cline-yes">222x</span>
<span class="cline-any cline-yes">222x</span>
<span class="cline-any cline-yes">222x</span>
<span class="cline-any cline-yes">222x</span>
<span class="cline-any cline-yes">233x</span>
<span class="cline-any cline-yes">233x</span>
<span class="cline-any cline-yes">377x</span>
<span class="cline-any cline-yes">377x</span>
<span class="cline-any cline-yes">377x</span>
<span class="cline-any cline-yes">363x</span>
<span class="cline-any cline-yes">363x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">67x</span>
<span class="cline-any cline-yes">67x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">233x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">222x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">47x</span>
<span class="cline-any cline-yes">47x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">40x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-yes">72x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (list) {
var item, text, columns, searchString, customSearch
&nbsp;
var prepare = {
resetList: function () {
list.i = 1
list.templater.clear()
customSearch = undefined
},
setOptions: function (args) {
if (args.length == 2 &amp;&amp; args[1] instanceof Array) {
columns = args[1]
} else if (args.length == 2 &amp;&amp; typeof args[1] == 'function') {
columns = undefined
customSearch = args[1]
} else if (args.length == 3) {
columns = args[1]
customSearch = args[2]
} else {
columns = undefined
}
},
setColumns: function () {
<span class="missing-if-branch" title="if path not taken" >I</span>if (list.items.length === 0) <span class="cstat-no" title="statement not covered" >return</span>
if (columns === undefined) {
columns = list.searchColumns === undefined ? prepare.toArray(list.items[0].values()) : list.searchColumns
}
},
setSearchString: function (s) {
s = list.utils.toString(s).toLowerCase()
s = s.replace(/[-[\]{}()*+?.,\\^$|#]/g, '\\$&amp;') // Escape regular expression characters
searchString = s
},
toArray: function (values) {
var tmpColumn = []
for (var name in values) {
tmpColumn.push(name)
}
return tmpColumn
},
}
var search = {
list: function () {
// Extract quoted phrases "word1 word2" from original searchString
// searchString is converted to lowercase by List.js
var words = [],
phrase,
ss = searchString
while ((phrase = ss.match(/"([^"]+)"/)) !== null) {
words.push(phrase[1])
ss = ss.substring(0, phrase.index) + ss.substring(phrase.index + phrase[0].length)
}
// Get remaining space-separated words (if any)
ss = ss.trim()
if (ss.length) words = words.concat(ss.split(/\s+/))
for (var k = 0, kl = list.items.length; k &lt; kl; k++) {
var item = list.items[k]
item.found = false
<span class="missing-if-branch" title="if path not taken" >I</span>if (!words.length) <span class="cstat-no" title="statement not covered" >continue</span>
for (var i = 0, il = words.length; i &lt; il; i++) {
var word_found = false
for (var j = 0, jl = columns.length; j &lt; jl; j++) {
var values = item.values(),
column = columns[j]
if (values.hasOwnProperty(column) &amp;&amp; values[column] !== undefined &amp;&amp; values[column] !== null) {
var text = typeof values[column] !== 'string' ? values[column].toString() : values[column]
if (text.toLowerCase().indexOf(words[i]) !== -1) {
// word found, so no need to check it against any other columns
word_found = true
break
}
}
}
// this word not found? no need to check any other words, the item cannot match
if (!word_found) break
}
item.found = word_found
}
},
// Removed search.item() and search.values()
reset: function () {
list.reset.search()
list.searched = false
},
}
&nbsp;
var searchMethod = function (str) {
list.trigger('searchStart')
&nbsp;
prepare.resetList()
prepare.setSearchString(str)
prepare.setOptions(arguments) // str, cols|searchFunction, searchFunction
prepare.setColumns()
&nbsp;
if (searchString === '') {
search.reset()
} else {
list.searched = true
if (customSearch) {
customSearch(searchString, columns)
} else {
search.list()
}
}
&nbsp;
list.update()
list.trigger('searchComplete')
return list.visibleItems
}
&nbsp;
list.handlers.searchStart = list.handlers.searchStart || []
list.handlers.searchComplete = list.handlers.searchComplete || []
&nbsp;
list.utils.events.bind(
list.utils.getByClass(list.listContainer, list.searchClass),
'keyup',
list.utils.events.debounce(function (e) {
var target = e.target || <span class="branch-1 cbranch-no" title="branch not covered" >e.srcElement,</span> // IE have srcElement
alreadyCleared = target.value === '' &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >!list.searched</span>
<span class="missing-if-branch" title="else path not taken" >E</span>if (!alreadyCleared) {
// If oninput already have resetted the list, do nothing
searchMethod(target.value)
}
}, list.searchDelay)
)
&nbsp;
// Used to detect click on HTML5 clear button
list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', <span class="fstat-no" title="function not covered" >fu</span>nction (e) {
var target = <span class="cstat-no" title="statement not covered" >e.target || e.srcElement</span>
<span class="cstat-no" title="statement not covered" > if (target.value === '') {</span>
<span class="cstat-no" title="statement not covered" > searchMethod('')</span>
}
})
&nbsp;
return searchMethod
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,392 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/sort.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> sort.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">96.92% </span>
<span class="quiet">Statements</span>
<span class='fraction'>63/65</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">95.74% </span>
<span class="quiet">Branches</span>
<span class='fraction'>45/47</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">96.72% </span>
<span class="quiet">Lines</span>
<span class='fraction'>59/61</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">174x</span>
<span class="cline-any cline-yes">39x</span>
<span class="cline-any cline-yes">39x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">22x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">23x</span>
<span class="cline-any cline-yes">23x</span>
<span class="cline-any cline-yes">23x</span>
<span class="cline-any cline-yes">23x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">32x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">30x</span>
<span class="cline-any cline-yes">191x</span>
<span class="cline-any cline-yes">191x</span>
<span class="cline-any cline-yes">191x</span>
<span class="cline-any cline-yes">144x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">191x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-yes">33x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (list) {
var buttons = {
els: undefined,
clear: function () {
for (var i = 0, il = buttons.els.length; i &lt; il; i++) {
list.utils.classes(buttons.els[i]).remove('asc')
list.utils.classes(buttons.els[i]).remove('desc')
}
},
getOrder: function (btn) {
var predefinedOrder = list.utils.getAttribute(btn, 'data-order')
if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {
return predefinedOrder
} else if (list.utils.classes(btn).has('desc')) {
return 'asc'
} else if (list.utils.classes(btn).has('asc')) {
return 'desc'
} else {
return 'asc'
}
},
getInSensitive: function (btn, options) {
var insensitive = list.utils.getAttribute(btn, 'data-insensitive')
<span class="missing-if-branch" title="if path not taken" >I</span>if (insensitive === 'false') {
<span class="cstat-no" title="statement not covered" > options.insensitive = false</span>
} else {
options.insensitive = true
}
},
setOrder: function (options) {
for (var i = 0, il = buttons.els.length; i &lt; il; i++) {
var btn = buttons.els[i]
<span class="missing-if-branch" title="if path not taken" >I</span>if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {
<span class="cstat-no" title="statement not covered" > continue</span>
}
var predefinedOrder = list.utils.getAttribute(btn, 'data-order')
if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {
if (predefinedOrder == options.order) {
list.utils.classes(btn).add(options.order)
}
} else {
list.utils.classes(btn).add(options.order)
}
}
},
}
&nbsp;
var sort = function () {
list.trigger('sortStart')
var options = {}
&nbsp;
var target = arguments[0].currentTarget || arguments[0].srcElement || undefined
&nbsp;
if (target) {
options.valueName = list.utils.getAttribute(target, 'data-sort')
buttons.getInSensitive(target, options)
options.order = buttons.getOrder(target)
} else {
options = arguments[1] || options
options.valueName = arguments[0]
options.order = options.order || 'asc'
options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive
}
&nbsp;
buttons.clear()
buttons.setOrder(options)
&nbsp;
// caseInsensitive
// alphabet
var customSortFunction = options.sortFunction || list.sortFunction || null,
multi = options.order === 'desc' ? -1 : 1,
sortFunction
&nbsp;
if (customSortFunction) {
sortFunction = function (itemA, itemB) {
return customSortFunction(itemA, itemB, options) * multi
}
} else {
sortFunction = function (itemA, itemB) {
var sort = list.utils.naturalSort
sort.alphabet = list.alphabet || options.alphabet || undefined
if (!sort.alphabet &amp;&amp; options.insensitive) {
sort = list.utils.naturalSort.caseInsensitive
}
return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi
}
}
&nbsp;
list.items.sort(sortFunction)
list.update()
list.trigger('sortComplete')
}
&nbsp;
// Add handlers
list.handlers.sortStart = list.handlers.sortStart || []
list.handlers.sortComplete = list.handlers.sortComplete || []
&nbsp;
buttons.els = list.utils.getByClass(list.listContainer, list.sortClass)
list.utils.events.bind(buttons.els, 'click', sort)
list.on('searchStart', buttons.clear)
list.on('filterStart', buttons.clear)
&nbsp;
return sort
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,170 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/sorter.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> sorter.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>15/15</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>15/15</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">12x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-yes">239x</span>
<span class="cline-any cline-yes">239x</span>
<span class="cline-any cline-yes">34x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">205x</span>
<span class="cline-any cline-yes">202x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">239x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var naturalSort = require('string-natural-compare')
&nbsp;
module.exports = (items, column, options = {}) =&gt; {
const { sortFunction, order, alphabet, insensitive } = options
const caseSensitive = insensitive !== false
const multi = order === 'desc' ? -1 : 1
&nbsp;
if (sortFunction) {
return items.sort(function (itemA, itemB) {
return (
sortFunction(itemA, itemB, column, {
alphabet,
caseSensitive,
}) * multi
)
})
} else {
return items.sort(function (itemA, itemB) {
let sort = naturalSort
if (alphabet) {
sort.alphabet = alphabet
} else {
if (caseSensitive) {
sort = naturalSort.caseInsensitive
}
}
return sort(itemA.values()[column], itemB.values()[column]) * multi
})
}
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Dec 02 2020 12:55:03 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,665 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/templater.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> templater.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">98.52% </span>
<span class="quiet">Statements</span>
<span class='fraction'>133/135</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90.41% </span>
<span class="quiet">Branches</span>
<span class='fraction'>66/73</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>17/17</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">99.16% </span>
<span class="quiet">Lines</span>
<span class='fraction'>118/119</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a>
<a name='L138'></a><a href='#L138'>138</a>
<a name='L139'></a><a href='#L139'>139</a>
<a name='L140'></a><a href='#L140'>140</a>
<a name='L141'></a><a href='#L141'>141</a>
<a name='L142'></a><a href='#L142'>142</a>
<a name='L143'></a><a href='#L143'>143</a>
<a name='L144'></a><a href='#L144'>144</a>
<a name='L145'></a><a href='#L145'>145</a>
<a name='L146'></a><a href='#L146'>146</a>
<a name='L147'></a><a href='#L147'>147</a>
<a name='L148'></a><a href='#L148'>148</a>
<a name='L149'></a><a href='#L149'>149</a>
<a name='L150'></a><a href='#L150'>150</a>
<a name='L151'></a><a href='#L151'>151</a>
<a name='L152'></a><a href='#L152'>152</a>
<a name='L153'></a><a href='#L153'>153</a>
<a name='L154'></a><a href='#L154'>154</a>
<a name='L155'></a><a href='#L155'>155</a>
<a name='L156'></a><a href='#L156'>156</a>
<a name='L157'></a><a href='#L157'>157</a>
<a name='L158'></a><a href='#L158'>158</a>
<a name='L159'></a><a href='#L159'>159</a>
<a name='L160'></a><a href='#L160'>160</a>
<a name='L161'></a><a href='#L161'>161</a>
<a name='L162'></a><a href='#L162'>162</a>
<a name='L163'></a><a href='#L163'>163</a>
<a name='L164'></a><a href='#L164'>164</a>
<a name='L165'></a><a href='#L165'>165</a>
<a name='L166'></a><a href='#L166'>166</a>
<a name='L167'></a><a href='#L167'>167</a>
<a name='L168'></a><a href='#L168'>168</a>
<a name='L169'></a><a href='#L169'>169</a>
<a name='L170'></a><a href='#L170'>170</a>
<a name='L171'></a><a href='#L171'>171</a>
<a name='L172'></a><a href='#L172'>172</a>
<a name='L173'></a><a href='#L173'>173</a>
<a name='L174'></a><a href='#L174'>174</a>
<a name='L175'></a><a href='#L175'>175</a>
<a name='L176'></a><a href='#L176'>176</a>
<a name='L177'></a><a href='#L177'>177</a>
<a name='L178'></a><a href='#L178'>178</a>
<a name='L179'></a><a href='#L179'>179</a>
<a name='L180'></a><a href='#L180'>180</a>
<a name='L181'></a><a href='#L181'>181</a>
<a name='L182'></a><a href='#L182'>182</a>
<a name='L183'></a><a href='#L183'>183</a>
<a name='L184'></a><a href='#L184'>184</a>
<a name='L185'></a><a href='#L185'>185</a>
<a name='L186'></a><a href='#L186'>186</a>
<a name='L187'></a><a href='#L187'>187</a>
<a name='L188'></a><a href='#L188'>188</a>
<a name='L189'></a><a href='#L189'>189</a>
<a name='L190'></a><a href='#L190'>190</a>
<a name='L191'></a><a href='#L191'>191</a>
<a name='L192'></a><a href='#L192'>192</a>
<a name='L193'></a><a href='#L193'>193</a>
<a name='L194'></a><a href='#L194'>194</a>
<a name='L195'></a><a href='#L195'>195</a>
<a name='L196'></a><a href='#L196'>196</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">74x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">73x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">90x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">89x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">89x</span>
<span class="cline-any cline-yes">680x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">89x</span>
<span class="cline-any cline-yes">89x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">89x</span>
<span class="cline-any cline-yes">159x</span>
<span class="cline-any cline-yes">159x</span>
<span class="cline-any cline-yes">159x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">157x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">149x</span>
<span class="cline-any cline-yes">149x</span>
<span class="cline-any cline-yes">100x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">89x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">30x</span>
<span class="cline-any cline-yes">15x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">76x</span>
<span class="cline-any cline-yes">76x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">75x</span>
<span class="cline-any cline-yes">75x</span>
<span class="cline-any cline-yes">75x</span>
<span class="cline-any cline-yes">75x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">1634x</span>
<span class="cline-any cline-yes">2118x</span>
<span class="cline-any cline-yes">2118x</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2093x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">2073x</span>
<span class="cline-any cline-yes">1359x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">1634x</span>
<span class="cline-any cline-yes">1634x</span>
<span class="cline-any cline-yes">1634x</span>
<span class="cline-any cline-yes">1384x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">1379x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1359x</span>
<span class="cline-any cline-yes">1359x</span>
<span class="cline-any cline-yes">1005x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">190x</span>
<span class="cline-any cline-yes">190x</span>
<span class="cline-any cline-yes">190x</span>
<span class="cline-any cline-yes">236x</span>
<span class="cline-any cline-yes">236x</span>
<span class="cline-any cline-yes">236x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">232x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-yes">16x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">216x</span>
<span class="cline-any cline-yes">216x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">190x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">1638x</span>
<span class="cline-any cline-yes">981x</span>
<span class="cline-any cline-yes">1634x</span>
<span class="cline-any cline-yes">1634x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">4291x</span>
<span class="cline-any cline-yes">3608x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">683x</span>
<span class="cline-any cline-yes">683x</span>
<span class="cline-any cline-yes">683x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">2463x</span>
<span class="cline-any cline-yes">2463x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-yes">919x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">696x</span>
<span class="cline-any cline-yes">493x</span>
<span class="cline-any cline-yes">2311x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">91x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var Templater = function (list) {
var createItem,
templater = this
&nbsp;
var init = function () {
var itemSource
&nbsp;
if (typeof list.item === 'function') {
createItem = function (values) {
var item = list.item(values)
return getItemSource(item)
}
return
}
&nbsp;
if (typeof list.item === 'string') {
if (list.item.indexOf('&lt;') === -1) {
itemSource = document.getElementById(list.item)
} else {
itemSource = getItemSource(list.item)
}
} else {
/* If item source does not exists, use the first item in list as
source for new items */
itemSource = getFirstListItem()
}
&nbsp;
if (!itemSource) {
throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.")
}
&nbsp;
itemSource = createCleanTemplateItem(itemSource, list.valueNames)
&nbsp;
createItem = function () {
return itemSource.cloneNode(true)
}
}
&nbsp;
var createCleanTemplateItem = function (templateNode, valueNames) {
var el = templateNode.cloneNode(true)
el.removeAttribute('id')
&nbsp;
for (var i = 0, il = valueNames.length; i &lt; il; i++) {
var elm = undefined,
valueName = valueNames[i]
if (valueName.data) {
for (var j = 0, jl = valueName.data.length; j &lt; jl; j++) {
el.setAttribute('data-' + valueName.data[j], '')
}
} else if (valueName.attr &amp;&amp; valueName.name) {
elm = list.utils.getByClass(el, valueName.name, true)
<span class="missing-if-branch" title="else path not taken" >E</span>if (elm) {
elm.setAttribute(valueName.attr, '')
}
} else {
elm = list.utils.getByClass(el, valueName, true)
if (elm) {
elm.innerHTML = ''
}
}
}
return el
}
&nbsp;
var getFirstListItem = function () {
var nodes = list.list.childNodes
&nbsp;
for (var i = 0, il = nodes.length; i &lt; il; i++) {
// Only textnodes have a data attribute
if (nodes[i].data === undefined) {
return nodes[i].cloneNode(true)
}
}
return undefined
}
&nbsp;
var getItemSource = function (itemHTML) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof itemHTML !== 'string') <span class="cstat-no" title="statement not covered" >return undefined</span>
if (/&lt;tr[\s&gt;]/g.exec(itemHTML)) {
var tbody = document.createElement('tbody')
tbody.innerHTML = itemHTML
return tbody.firstElementChild
} else <span class="missing-if-branch" title="else path not taken" >E</span>if (itemHTML.indexOf('&lt;') !== -1) {
var div = document.createElement('div')
div.innerHTML = itemHTML
return div.firstElementChild
}
<span class="cstat-no" title="statement not covered" > return undefined</span>
}
&nbsp;
var getValueName = function (name) {
for (var i = 0, il = list.valueNames.length; i &lt; il; i++) {
var valueName = list.valueNames[i]
if (valueName.data) {
var data = valueName.data
for (var j = 0, jl = data.length; j &lt; jl; j++) {
if (data[j] === name) {
return { data: name }
}
}
} else if (valueName.attr &amp;&amp; valueName.name &amp;&amp; valueName.name == name) {
return valueName
} else if (valueName === name) {
return name
}
}
}
&nbsp;
var setValue = function (item, name, value) {
var elm = undefined,
valueName = getValueName(name)
if (!valueName) return
if (valueName.data) {
item.elm.setAttribute('data-' + valueName.data, value)
} else if (valueName.attr &amp;&amp; valueName.name) {
elm = list.utils.getByClass(item.elm, valueName.name, true)
<span class="missing-if-branch" title="else path not taken" >E</span>if (elm) {
elm.setAttribute(valueName.attr, value)
}
} else {
elm = list.utils.getByClass(item.elm, valueName, true)
if (elm) {
elm.innerHTML = value
}
}
}
&nbsp;
this.get = function (item, valueNames) {
templater.create(item)
var values = {}
for (var i = 0, il = valueNames.length; i &lt; il; i++) {
var elm = undefined,
valueName = valueNames[i]
if (valueName.data) {
for (var j = 0, jl = valueName.data.length; j &lt; jl; j++) {
values[valueName.data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueName.data[j])
}
} else if (valueName.attr &amp;&amp; valueName.name) {
elm = list.utils.getByClass(item.elm, valueName.name, true)
values[valueName.name] = elm ? list.utils.getAttribute(elm, valueName.attr) : <span class="branch-1 cbranch-no" title="branch not covered" >''</span>
} else {
elm = list.utils.getByClass(item.elm, valueName, true)
values[valueName] = elm ? elm.innerHTML : <span class="branch-1 cbranch-no" title="branch not covered" >''</span>
}
}
return values
}
&nbsp;
this.set = function (item, values) {
if (!templater.create(item)) {
for (var v in values) {
<span class="missing-if-branch" title="else path not taken" >E</span>if (values.hasOwnProperty(v)) {
setValue(item, v, values[v])
}
}
}
}
&nbsp;
this.create = function (item) {
if (item.elm !== undefined) {
return false
}
item.elm = createItem(item.values())
templater.set(item, item.values())
return true
}
this.remove = function (item) {
if (item.elm.parentNode === list.list) {
list.list.removeChild(item.elm)
}
}
this.show = function (item) {
templater.create(item)
list.list.appendChild(item.elm)
}
this.hide = function (item) {
if (item.elm !== undefined &amp;&amp; item.elm.parentNode === list.list) {
list.list.removeChild(item.elm)
}
}
this.clear = function () {
/* .innerHTML = ''; fucks up IE */
if (list.list.hasChildNodes()) {
while (list.list.childNodes.length &gt;= 1) {
list.list.removeChild(list.list.firstChild)
}
}
}
&nbsp;
init()
}
&nbsp;
module.exports = function (list) {
return new Templater(list)
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,566 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/classes.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> classes.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">54.72% </span>
<span class="quiet">Statements</span>
<span class='fraction'>29/53</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">33.33% </span>
<span class="quiet">Branches</span>
<span class='fraction'>10/30</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>7/7</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">58% </span>
<span class="quiet">Lines</span>
<span class='fraction'>29/50</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a>
<a name='L138'></a><a href='#L138'>138</a>
<a name='L139'></a><a href='#L139'>139</a>
<a name='L140'></a><a href='#L140'>140</a>
<a name='L141'></a><a href='#L141'>141</a>
<a name='L142'></a><a href='#L142'>142</a>
<a name='L143'></a><a href='#L143'>143</a>
<a name='L144'></a><a href='#L144'>144</a>
<a name='L145'></a><a href='#L145'>145</a>
<a name='L146'></a><a href='#L146'>146</a>
<a name='L147'></a><a href='#L147'>147</a>
<a name='L148'></a><a href='#L148'>148</a>
<a name='L149'></a><a href='#L149'>149</a>
<a name='L150'></a><a href='#L150'>150</a>
<a name='L151'></a><a href='#L151'>151</a>
<a name='L152'></a><a href='#L152'>152</a>
<a name='L153'></a><a href='#L153'>153</a>
<a name='L154'></a><a href='#L154'>154</a>
<a name='L155'></a><a href='#L155'>155</a>
<a name='L156'></a><a href='#L156'>156</a>
<a name='L157'></a><a href='#L157'>157</a>
<a name='L158'></a><a href='#L158'>158</a>
<a name='L159'></a><a href='#L159'>159</a>
<a name='L160'></a><a href='#L160'>160</a>
<a name='L161'></a><a href='#L161'>161</a>
<a name='L162'></a><a href='#L162'>162</a>
<a name='L163'></a><a href='#L163'>163</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">172x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">172x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">172x</span>
<span class="cline-any cline-yes">172x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">77x</span>
<span class="cline-any cline-yes">77x</span>
<span class="cline-any cline-yes">77x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">79x</span>
<span class="cline-any cline-yes">79x</span>
<span class="cline-any cline-yes">79x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">13x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/**
* Module dependencies.
*/
&nbsp;
var index = require('./index-of')
&nbsp;
/**
* Whitespace regexp.
*/
&nbsp;
var re = /\s+/
&nbsp;
/**
* toString reference.
*/
&nbsp;
var toString = Object.prototype.toString
&nbsp;
/**
* Wrap `el` in a `ClassList`.
*
* @param {Element} el
* @return {ClassList}
* @api public
*/
&nbsp;
module.exports = function (el) {
return new ClassList(el)
}
&nbsp;
/**
* Initialize a new ClassList for `el`.
*
* @param {Element} el
* @api private
*/
&nbsp;
function ClassList(el) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (!el || !el.nodeType) {
<span class="cstat-no" title="statement not covered" > throw new Error('A DOM element reference is required')</span>
}
this.el = el
this.list = el.classList
}
&nbsp;
/**
* Add class `name` if not already present.
*
* @param {String} name
* @return {ClassList}
* @api public
*/
&nbsp;
ClassList.prototype.add = function (name) {
// classList
<span class="missing-if-branch" title="else path not taken" >E</span>if (this.list) {
this.list.add(name)
return this
}
&nbsp;
// fallback
var arr = <span class="cstat-no" title="statement not covered" >this.array()</span>
var i = <span class="cstat-no" title="statement not covered" >index(arr, name)</span>
<span class="cstat-no" title="statement not covered" > if (!~i) <span class="cstat-no" title="statement not covered" >arr.push(name)</span></span>
<span class="cstat-no" title="statement not covered" > this.el.className = arr.join(' ')</span>
<span class="cstat-no" title="statement not covered" > return this</span>
}
&nbsp;
/**
* Remove class `name` when present, or
* pass a regular expression to remove
* any which match.
*
* @param {String|RegExp} name
* @return {ClassList}
* @api public
*/
&nbsp;
ClassList.prototype.remove = function (name) {
// classList
<span class="missing-if-branch" title="else path not taken" >E</span>if (this.list) {
this.list.remove(name)
return this
}
&nbsp;
// fallback
var arr = <span class="cstat-no" title="statement not covered" >this.array()</span>
var i = <span class="cstat-no" title="statement not covered" >index(arr, name)</span>
<span class="cstat-no" title="statement not covered" > if (~i) <span class="cstat-no" title="statement not covered" >arr.splice(i, 1)</span></span>
<span class="cstat-no" title="statement not covered" > this.el.className = arr.join(' ')</span>
<span class="cstat-no" title="statement not covered" > return this</span>
}
&nbsp;
/**
* Toggle class `name`, can force state via `force`.
*
* For browsers that support classList, but do not support `force` yet,
* the mistake will be detected and corrected.
*
* @param {String} name
* @param {Boolean} force
* @return {ClassList}
* @api public
*/
&nbsp;
ClassList.prototype.toggle = function (name, force) {
// classList
<span class="missing-if-branch" title="else path not taken" >E</span>if (this.list) {
<span class="missing-if-branch" title="if path not taken" >I</span>if ('undefined' !== typeof force) {
<span class="cstat-no" title="statement not covered" > if (force !== this.list.toggle(name, force)) {</span>
<span class="cstat-no" title="statement not covered" > this.list.toggle(name) </span>// toggle again to correct
}
} else {
this.list.toggle(name)
}
return this
}
&nbsp;
// fallback
<span class="cstat-no" title="statement not covered" > if ('undefined' !== typeof force) {</span>
<span class="cstat-no" title="statement not covered" > if (!force) {</span>
<span class="cstat-no" title="statement not covered" > this.remove(name)</span>
} else {
<span class="cstat-no" title="statement not covered" > this.add(name)</span>
}
} else {
<span class="cstat-no" title="statement not covered" > if (this.has(name)) {</span>
<span class="cstat-no" title="statement not covered" > this.remove(name)</span>
} else {
<span class="cstat-no" title="statement not covered" > this.add(name)</span>
}
}
&nbsp;
<span class="cstat-no" title="statement not covered" > return this</span>
}
&nbsp;
/**
* Return an array of classes.
*
* @return {Array}
* @api public
*/
&nbsp;
ClassList.prototype.array = function () {
var className = this.el.getAttribute('class') || <span class="branch-1 cbranch-no" title="branch not covered" >''</span>
var str = className.replace(/^\s+|\s+$/g, '')
var arr = str.split(re)
<span class="missing-if-branch" title="if path not taken" >I</span>if ('' === arr[0]) <span class="cstat-no" title="statement not covered" >arr.shift()</span>
return arr
}
&nbsp;
/**
* Check if class `name` is present.
*
* @param {String} name
* @return {ClassList}
* @api public
*/
&nbsp;
ClassList.prototype.has = ClassList.prototype.contains = function (name) {
return this.list ? this.list.contains(name) : <span class="branch-1 cbranch-no" title="branch not covered" >!!~index(this.array(), name)</span>
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,284 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/events.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> events.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">44.83% </span>
<span class="quiet">Statements</span>
<span class='fraction'>13/29</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">33.33% </span>
<span class="quiet">Branches</span>
<span class='fraction'>6/18</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">40% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">47.83% </span>
<span class="quiet">Lines</span>
<span class='fraction'>11/23</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">364x</span>
<span class="cline-any cline-yes">364x</span>
<span class="cline-any cline-yes">45x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">180x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var bind = window.addEventListener ? 'addEventListener' : <span class="branch-1 cbranch-no" title="branch not covered" >'attachEvent',</span>
unbind = window.removeEventListener ? 'removeEventListener' : <span class="branch-1 cbranch-no" title="branch not covered" >'detachEvent',</span>
prefix = bind !== 'addEventListener' ? <span class="branch-0 cbranch-no" title="branch not covered" >'on' </span>: '',
toArray = require('./to-array')
&nbsp;
/**
* Bind `el` event `type` to `fn`.
*
* @param {Element} el, NodeList, HTMLCollection or Array
* @param {String} type
* @param {Function} fn
* @param {Boolean} capture
* @api public
*/
&nbsp;
exports.bind = function (el, type, fn, capture) {
el = toArray(el)
for (var i = 0, il = el.length; i &lt; il; i++) {
el[i][bind](prefix + type, fn, capture || false)
}
}
&nbsp;
/**
* Unbind `el` event `type`'s callback `fn`.
*
* @param {Element} el, NodeList, HTMLCollection or Array
* @param {String} type
* @param {Function} fn
* @param {Boolean} capture
* @api public
*/
&nbsp;
exports.unbind = <span class="fstat-no" title="function not covered" >fu</span>nction (el, type, fn, capture) {
<span class="cstat-no" title="statement not covered" > el = toArray(el)</span>
<span class="cstat-no" title="statement not covered" > for (var i = <span class="cstat-no" title="statement not covered" >0,</span> il = <span class="cstat-no" title="statement not covered" >el.length;</span> i &lt; il; i++) {</span>
<span class="cstat-no" title="statement not covered" > el[i][unbind](prefix + type, fn, capture || false)</span>
}
}
&nbsp;
/**
* Returns a function, that, as long as it continues to be invoked, will not
* be triggered. The function will be called after it stops being called for
* `wait` milliseconds. If `immediate` is true, trigger the function on the
* leading edge, instead of the trailing.
*
* @param {Function} fn
* @param {Integer} wait
* @param {Boolean} immediate
* @api public
*/
&nbsp;
exports.debounce = function (fn, wait, immediate) {
var timeout
return wait
? <span class="fstat-no" title="function not covered" ><span class="branch-0 cbranch-no" title="branch not covered" >fu</span>nction () {</span>
var context = <span class="cstat-no" title="statement not covered" >this,</span>
args = <span class="cstat-no" title="statement not covered" >arguments</span>
var later = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction () {</span>
<span class="cstat-no" title="statement not covered" > timeout = null</span>
<span class="cstat-no" title="statement not covered" > if (!immediate) <span class="cstat-no" title="statement not covered" >fn.apply(context, args)</span></span>
}
var callNow = <span class="cstat-no" title="statement not covered" >immediate &amp;&amp; !timeout</span>
<span class="cstat-no" title="statement not covered" > clearTimeout(timeout)</span>
<span class="cstat-no" title="statement not covered" > timeout = setTimeout(later, wait)</span>
<span class="cstat-no" title="statement not covered" > if (callNow) <span class="cstat-no" title="statement not covered" >fn.apply(context, args)</span></span>
}
: fn
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,134 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/extend.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> extend.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">88.89% </span>
<span class="quiet">Statements</span>
<span class='fraction'>8/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>7/7</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">181x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">181x</span>
<span class="cline-any cline-yes">181x</span>
<span class="cline-any cline-yes">181x</span>
<span class="cline-any cline-yes">188x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">181x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/*
* Source: https://github.com/segmentio/extend
*/
&nbsp;
module.exports = function extend(object) {
// Takes an unlimited number of extenders.
var args = Array.prototype.slice.call(arguments, 1)
&nbsp;
// For each extender, copy their properties on our object.
for (var i = 0, source; (source = args[i]); i++) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (!source) <span class="cstat-no" title="statement not covered" >continue</span>
for (var property in source) {
object[property] = source[property]
}
}
&nbsp;
return object
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,449 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/fuzzy.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> fuzzy.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">95.24% </span>
<span class="quiet">Statements</span>
<span class='fraction'>60/63</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">75% </span>
<span class="quiet">Branches</span>
<span class='fraction'>24/32</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">98.31% </span>
<span class="quiet">Lines</span>
<span class='fraction'>58/59</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">330x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">330x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">698x</span>
<span class="cline-any cline-yes">698x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">698x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">698x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">515x</span>
<span class="cline-any cline-yes">277x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">238x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">515x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3104x</span>
<span class="cline-any cline-yes">3104x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1225x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1879x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3104x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">161x</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">101x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">60x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (text, pattern, options) {
// Aproximately where in the text is the pattern expected to be found?
var Match_Location = options.location || 0
&nbsp;
//Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
var Match_Distance = options.distance || <span class="branch-1 cbranch-no" title="branch not covered" >100</span>
&nbsp;
// At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.
var Match_Threshold = options.threshold || <span class="branch-1 cbranch-no" title="branch not covered" >0.4</span>
&nbsp;
<span class="missing-if-branch" title="if path not taken" >I</span>if (pattern === text) <span class="cstat-no" title="statement not covered" >return true </span>// Exact match
<span class="missing-if-branch" title="if path not taken" >I</span>if (pattern.length &gt; 32) <span class="cstat-no" title="statement not covered" >return false </span>// This algorithm cannot be used
&nbsp;
// Set starting location at beginning text and initialise the alphabet.
var loc = Match_Location,
s = (function () {
var q = {},
i
&nbsp;
for (i = 0; i &lt; pattern.length; i++) {
q[pattern.charAt(i)] = 0
}
&nbsp;
for (i = 0; i &lt; pattern.length; i++) {
q[pattern.charAt(i)] |= 1 &lt;&lt; (pattern.length - i - 1)
}
&nbsp;
return q
})()
&nbsp;
// Compute and return the score for a match with e errors and x location.
// Accesses loc and pattern through being a closure.
&nbsp;
function match_bitapScore_(e, x) {
var accuracy = e / pattern.length,
proximity = Math.abs(loc - x)
&nbsp;
<span class="missing-if-branch" title="if path not taken" >I</span>if (!Match_Distance) {
// Dodge divide by zero error.
<span class="cstat-no" title="statement not covered" > return proximity ? 1.0 : accuracy</span>
}
return accuracy + proximity / Match_Distance
}
&nbsp;
var score_threshold = Match_Threshold, // Highest score beyond which we give up.
best_loc = text.indexOf(pattern, loc) // Is there a nearby exact match? (speedup)
&nbsp;
if (best_loc != -1) {
score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)
// What about in the other direction? (speedup)
best_loc = text.lastIndexOf(pattern, loc + pattern.length)
&nbsp;
if (best_loc != -1) {
score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)
}
}
&nbsp;
// Initialise the bit arrays.
var matchmask = 1 &lt;&lt; (pattern.length - 1)
best_loc = -1
&nbsp;
var bin_min, bin_mid
var bin_max = pattern.length + text.length
var last_rd
for (var d = 0; d &lt; pattern.length; d++) {
// Scan for the best match; each iteration allows for one more error.
// Run a binary search to determine how far from 'loc' we can stray at this
// error level.
bin_min = 0
bin_mid = bin_max
while (bin_min &lt; bin_mid) {
if (match_bitapScore_(d, loc + bin_mid) &lt;= score_threshold) {
bin_min = bin_mid
} else {
bin_max = bin_mid
}
bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min)
}
// Use the result from this iteration as the maximum for the next.
bin_max = bin_mid
var start = Math.max(1, loc - bin_mid + 1)
var finish = Math.min(loc + bin_mid, text.length) + pattern.length
&nbsp;
var rd = Array(finish + 2)
rd[finish + 1] = (1 &lt;&lt; d) - 1
for (var j = finish; j &gt;= start; j--) {
// The alphabet (s) is a sparse hash, so the following line generates
// warnings.
var charMatch = s[text.charAt(j - 1)]
if (d === 0) {
// First pass: exact match.
rd[j] = ((rd[j + 1] &lt;&lt; 1) | 1) &amp; charMatch
} else {
// Subsequent passes: fuzzy match.
rd[j] = (((rd[j + 1] &lt;&lt; 1) | 1) &amp; charMatch) | (((last_rd[j + 1] | last_rd[j]) &lt;&lt; 1) | 1) | last_rd[j + 1]
}
if (rd[j] &amp; matchmask) {
var score = match_bitapScore_(d, j - 1)
// This match will almost certainly be better than any existing match.
// But check anyway.
<span class="missing-if-branch" title="else path not taken" >E</span>if (score &lt;= score_threshold) {
// Told you so.
score_threshold = score
best_loc = j - 1
if (best_loc &gt; loc) {
// When passing loc, don't exceed our current distance from loc.
start = Math.max(1, 2 * loc - best_loc)
} else {
// Already passed loc, downhill from here on in.
break
}
}
}
}
// No hope for a (better) match at greater error levels.
if (match_bitapScore_(d + 1, loc) &gt; score_threshold) {
break
}
last_rd = rd
}
&nbsp;
return best_loc &lt; 0 ? false : true
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,158 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/get-attribute.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> get-attribute.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">90.91% </span>
<span class="quiet">Statements</span>
<span class='fraction'>10/11</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">77.78% </span>
<span class="quiet">Branches</span>
<span class='fraction'>7/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90% </span>
<span class="quiet">Lines</span>
<span class='fraction'>9/10</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">116x</span>
<span class="cline-any cline-yes">116x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">83x</span>
<span class="cline-any cline-yes">83x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">116x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/**
* A cross-browser implementation of getAttribute.
* Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath
*
* Return the value for `attr` at `element`.
*
* @param {Element} el
* @param {String} attr
* @api public
*/
&nbsp;
module.exports = function (el, attr) {
var result = (el.getAttribute &amp;&amp; el.getAttribute(attr)) || null
if (!result) {
var attrs = el.attributes
var length = attrs.length
for (var i = 0; i &lt; length; i++) {
<span class="missing-if-branch" title="else path not taken" >E</span>if (attrs[i] !== undefined) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (attrs[i].nodeName === attr) {
<span class="cstat-no" title="statement not covered" > result = attrs[i].nodeValue</span>
}
}
}
}
return result
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,269 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/get-by-class.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> get-by-class.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">93.75% </span>
<span class="quiet">Statements</span>
<span class='fraction'>30/32</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">81.82% </span>
<span class="quiet">Branches</span>
<span class='fraction'>18/22</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">93.33% </span>
<span class="quiet">Lines</span>
<span class='fraction'>28/30</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">2220x</span>
<span class="cline-any cline-yes">1859x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">361x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">2222x</span>
<span class="cline-any cline-yes">2222x</span>
<span class="cline-any cline-yes">2220x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/**
* A cross-browser implementation of getElementsByClass.
* Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass.
*
* Find all elements with class `className` inside `container`.
* Use `single = true` to increase performance in older browsers
* when only one element is needed.
*
* @param {String} className
* @param {Element} container
* @param {Boolean} single
* @api public
*/
&nbsp;
var getElementsByClassName = function (container, className, single) {
if (single) {
return container.getElementsByClassName(className)[0]
} else {
return container.getElementsByClassName(className)
}
}
&nbsp;
var querySelector = function (container, className, single) {
className = '.' + className
<span class="missing-if-branch" title="if path not taken" >I</span>if (single) {
<span class="cstat-no" title="statement not covered" > return container.querySelector(className)</span>
} else {
return container.querySelectorAll(className)
}
}
&nbsp;
var polyfill = function (container, className, single) {
var classElements = [],
tag = '*'
&nbsp;
var els = container.getElementsByTagName(tag)
var elsLen = els.length
var pattern = new RegExp('(^|\\s)' + className + '(\\s|$)')
for (var i = 0, j = 0; i &lt; elsLen; i++) {
<span class="missing-if-branch" title="else path not taken" >E</span>if (pattern.test(els[i].className)) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (single) {
<span class="cstat-no" title="statement not covered" > return els[i]</span>
} else {
classElements[j] = els[i]
j++
}
}
}
return classElements
}
&nbsp;
module.exports = (function () {
return function (container, className, single, options) {
options = options || {}
if ((options.test &amp;&amp; options.getElementsByClassName) || (!options.test &amp;&amp; document.getElementsByClassName)) {
return getElementsByClassName(container, className, single)
} else if ((options.test &amp;&amp; options.querySelector) || (!options.test &amp;&amp; <span class="branch-3 cbranch-no" title="branch not covered" >document.querySelector)</span>) {
return querySelector(container, className, single)
} else {
return polyfill(container, className, single)
}
}
})()
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,107 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/index-of.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> index-of.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">40% </span>
<span class="quiet">Statements</span>
<span class='fraction'>4/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">25% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Lines</span>
<span class='fraction'>3/6</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var indexOf = [].indexOf
&nbsp;
module.exports = function(arr, obj){
<span class="missing-if-branch" title="else path not taken" >E</span>if (indexOf) return arr.indexOf(obj);
<span class="cstat-no" title="statement not covered" > for (var i = <span class="cstat-no" title="statement not covered" >0,</span> il = <span class="cstat-no" title="statement not covered" >arr.length;</span> i &lt; il; ++i) {</span>
<span class="cstat-no" title="statement not covered" > if (arr[i] === obj) <span class="cstat-no" title="statement not covered" >return i;</span></span>
}
<span class="cstat-no" title="statement not covered" > return -1</span>
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,231 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> src/utils</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">75.11% </span>
<span class="quiet">Statements</span>
<span class='fraction'>178/237</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">58.74% </span>
<span class="quiet">Branches</span>
<span class='fraction'>84/143</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">88.46% </span>
<span class="quiet">Functions</span>
<span class='fraction'>23/26</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">80.49% </span>
<span class="quiet">Lines</span>
<span class='fraction'>165/205</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line medium'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file medium" data-value="classes.js"><a href="classes.js.html">classes.js</a></td>
<td data-value="54.72" class="pic medium">
<div class="chart"><div class="cover-fill" style="width: 54%"></div><div class="cover-empty" style="width: 46%"></div></div>
</td>
<td data-value="54.72" class="pct medium">54.72%</td>
<td data-value="53" class="abs medium">29/53</td>
<td data-value="33.33" class="pct low">33.33%</td>
<td data-value="30" class="abs low">10/30</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="7" class="abs high">7/7</td>
<td data-value="58" class="pct medium">58%</td>
<td data-value="50" class="abs medium">29/50</td>
</tr>
<tr>
<td class="file low" data-value="events.js"><a href="events.js.html">events.js</a></td>
<td data-value="44.83" class="pic low">
<div class="chart"><div class="cover-fill" style="width: 44%"></div><div class="cover-empty" style="width: 56%"></div></div>
</td>
<td data-value="44.83" class="pct low">44.83%</td>
<td data-value="29" class="abs low">13/29</td>
<td data-value="33.33" class="pct low">33.33%</td>
<td data-value="18" class="abs low">6/18</td>
<td data-value="40" class="pct low">40%</td>
<td data-value="5" class="abs low">2/5</td>
<td data-value="47.83" class="pct low">47.83%</td>
<td data-value="23" class="abs low">11/23</td>
</tr>
<tr>
<td class="file high" data-value="extend.js"><a href="extend.js.html">extend.js</a></td>
<td data-value="88.89" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 88%"></div><div class="cover-empty" style="width: 12%"></div></div>
</td>
<td data-value="88.89" class="pct high">88.89%</td>
<td data-value="9" class="abs high">8/9</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="2" class="abs medium">1/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="7" class="abs high">7/7</td>
</tr>
<tr>
<td class="file high" data-value="fuzzy.js"><a href="fuzzy.js.html">fuzzy.js</a></td>
<td data-value="95.24" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 95%"></div><div class="cover-empty" style="width: 5%"></div></div>
</td>
<td data-value="95.24" class="pct high">95.24%</td>
<td data-value="63" class="abs high">60/63</td>
<td data-value="75" class="pct medium">75%</td>
<td data-value="32" class="abs medium">24/32</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="98.31" class="pct high">98.31%</td>
<td data-value="59" class="abs high">58/59</td>
</tr>
<tr>
<td class="file high" data-value="get-attribute.js"><a href="get-attribute.js.html">get-attribute.js</a></td>
<td data-value="90.91" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 90%"></div><div class="cover-empty" style="width: 10%"></div></div>
</td>
<td data-value="90.91" class="pct high">90.91%</td>
<td data-value="11" class="abs high">10/11</td>
<td data-value="77.78" class="pct medium">77.78%</td>
<td data-value="9" class="abs medium">7/9</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
</tr>
<tr>
<td class="file high" data-value="get-by-class.js"><a href="get-by-class.js.html">get-by-class.js</a></td>
<td data-value="93.75" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 93%"></div><div class="cover-empty" style="width: 7%"></div></div>
</td>
<td data-value="93.75" class="pct high">93.75%</td>
<td data-value="32" class="abs high">30/32</td>
<td data-value="81.82" class="pct high">81.82%</td>
<td data-value="22" class="abs high">18/22</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="93.33" class="pct high">93.33%</td>
<td data-value="30" class="abs high">28/30</td>
</tr>
<tr>
<td class="file low" data-value="index-of.js"><a href="index-of.js.html">index-of.js</a></td>
<td data-value="40" class="pic low">
<div class="chart"><div class="cover-fill" style="width: 40%"></div><div class="cover-empty" style="width: 60%"></div></div>
</td>
<td data-value="40" class="pct low">40%</td>
<td data-value="10" class="abs low">4/10</td>
<td data-value="25" class="pct low">25%</td>
<td data-value="4" class="abs low">1/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="6" class="abs medium">3/6</td>
</tr>
<tr>
<td class="file medium" data-value="to-array.js"><a href="to-array.js.html">to-array.js</a></td>
<td data-value="76" class="pic medium">
<div class="chart"><div class="cover-fill" style="width: 76%"></div><div class="cover-empty" style="width: 24%"></div></div>
</td>
<td data-value="76" class="pct medium">76%</td>
<td data-value="25" class="abs medium">19/25</td>
<td data-value="59.09" class="pct medium">59.09%</td>
<td data-value="22" class="abs medium">13/22</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
</tr>
<tr>
<td class="file high" data-value="to-string.js"><a href="to-string.js.html">to-string.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,179 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/to-array.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> to-array.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">76% </span>
<span class="quiet">Statements</span>
<span class='fraction'>19/25</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">59.09% </span>
<span class="quiet">Branches</span>
<span class='fraction'>13/22</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>15/15</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">364x</span>
<span class="cline-any cline-yes">364x</span>
<span class="cline-any cline-yes">364x</span>
<span class="cline-any cline-yes">364x</span>
<span class="cline-any cline-yes">364x</span>
<span class="cline-any cline-yes">364x</span>
<span class="cline-any cline-yes">360x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">360x</span>
<span class="cline-any cline-yes">360x</span>
<span class="cline-any cline-yes">41x</span>
<span class="cline-any cline-yes">41x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">360x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">364x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/**
* Source: https://github.com/timoxley/to-array
*
* Convert an array-like object into an `Array`.
* If `collection` is already an `Array`, then will return a clone of `collection`.
*
* @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`
* @return {Array} Naive conversion of `collection` to a new `Array`.
* @api public
*/
&nbsp;
module.exports = function toArray(collection) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof collection === 'undefined') <span class="cstat-no" title="statement not covered" >return []</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if (collection === null) <span class="cstat-no" title="statement not covered" >return [null]</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if (collection === window) <span class="cstat-no" title="statement not covered" >return [window]</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof collection === 'string') <span class="cstat-no" title="statement not covered" >return [collection]</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if (isArray(collection)) <span class="cstat-no" title="statement not covered" >return collection</span>
if (typeof collection.length != 'number') return [collection]
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof collection === 'function' &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >collection instanceof Function)</span> <span class="cstat-no" title="statement not covered" >return [collection]</span>
&nbsp;
var arr = [];
for (var i = 0, il = collection.length; i &lt; il; i++) {
<span class="missing-if-branch" title="else path not taken" >E</span>if (Object.prototype.hasOwnProperty.call(collection, i) || <span class="branch-1 cbranch-no" title="branch not covered" >i in collection)</span> {
arr.push(collection[i])
}
}
if (!arr.length) return []
return arr
}
&nbsp;
function isArray(arr) {
return Object.prototype.toString.call(arr) === '[object Array]'
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,98 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/to-string.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> to-string.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>5/5</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">132x</span>
<span class="cline-any cline-yes">132x</span>
<span class="cline-any cline-yes">132x</span>
<span class="cline-any cline-yes">132x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function (s) {
s = s === undefined ? '' : s
s = s === null ? '' : s
s = s.toString()
return s
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Jan 17 2021 17:51:37 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,197 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for src/utils/value-names.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> value-names.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">65.63% </span>
<span class="quiet">Statements</span>
<span class='fraction'>21/32</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">47.83% </span>
<span class="quiet">Branches</span>
<span class='fraction'>11/23</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">66.67% </span>
<span class="quiet">Lines</span>
<span class='fraction'>18/27</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">421x</span>
<span class="cline-any cline-yes">421x</span>
<span class="cline-any cline-yes">421x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">421x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">421x</span>
<span class="cline-any cline-yes">209x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">421x</span>
<span class="cline-any cline-yes">421x</span>
<span class="cline-any cline-yes">421x</span>
<span class="cline-any cline-yes">209x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">209x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">209x</span>
<span class="cline-any cline-yes">209x</span>
<span class="cline-any cline-yes">209x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var getByClass = require('./get-by-class')
&nbsp;
const getDefinitionFromName = (name, valueNames) =&gt; {
for (var i = 0, il = valueNames.length; i &lt; il; i++) {
var valueName = valueNames[i]
<span class="missing-if-branch" title="if path not taken" >I</span>if (valueName.data) {
var data = <span class="cstat-no" title="statement not covered" >valueName.data</span>
<span class="cstat-no" title="statement not covered" > for (var j = <span class="cstat-no" title="statement not covered" >0,</span> jl = <span class="cstat-no" title="statement not covered" >data.length;</span> j &lt; jl; j++) {</span>
<span class="cstat-no" title="statement not covered" > if (data[j] === name) {</span>
<span class="cstat-no" title="statement not covered" > return { data: name }</span>
}
}
} else <span class="missing-if-branch" title="if path not taken" >I</span>if (valueName.attr &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >valueName.name </span>&amp;&amp; <span class="branch-2 cbranch-no" title="branch not covered" >valueName.name == name)</span> {
<span class="cstat-no" title="statement not covered" > return valueName</span>
} else if (valueName === name) {
return name
}
}
}
const set = (el, name, value, valueNames) =&gt; {
var elm = undefined,
valueName = getDefinitionFromName(name, valueNames)
if (!valueName) return
<span class="missing-if-branch" title="if path not taken" >I</span>if (valueName.data) {
<span class="cstat-no" title="statement not covered" > el.setAttribute('data-' + valueName.data, value)</span>
} else <span class="missing-if-branch" title="if path not taken" >I</span>if (valueName.attr &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >valueName.name)</span> {
<span class="cstat-no" title="statement not covered" > elm = getByClass(el, valueName.name, true)</span>
<span class="cstat-no" title="statement not covered" > if (elm) {</span>
<span class="cstat-no" title="statement not covered" > elm.setAttribute(valueName.attr, value)</span>
}
} else {
elm = getByClass(el, valueName, true)
<span class="missing-if-branch" title="else path not taken" >E</span>if (elm) {
elm.innerHTML = value
}
}
}
&nbsp;
module.exports = { getDefinitionFromName, set }
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Dec 02 2020 12:55:03 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,491 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for templater.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> templater.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">97.85% </span>
<span class="quiet">Statements</span>
<span class='fraction'>91/93</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">86.36% </span>
<span class="quiet">Branches</span>
<span class='fraction'>38/44</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>11/11</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">98.78% </span>
<span class="quiet">Lines</span>
<span class='fraction'>81/82</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a>
<a name='L138'></a><a href='#L138'>138</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">119x</span>
<span class="cline-any cline-yes">119x</span>
<span class="cline-any cline-yes">119x</span>
<span class="cline-any cline-yes">199x</span>
<span class="cline-any cline-yes">199x</span>
<span class="cline-any cline-yes">199x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">196x</span>
<span class="cline-any cline-yes">12x</span>
<span class="cline-any cline-yes">12x</span>
<span class="cline-any cline-yes">12x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">184x</span>
<span class="cline-any cline-yes">184x</span>
<span class="cline-any cline-yes">134x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">119x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">103x</span>
<span class="cline-any cline-yes">103x</span>
<span class="cline-any cline-yes">103x</span>
<span class="cline-any cline-yes">103x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">124x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">120x</span>
<span class="cline-any cline-yes">102x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">100x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">34x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">120x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">119x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">119x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">589x</span>
<span class="cline-any cline-yes">589x</span>
<span class="cline-any cline-yes">589x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">192x</span>
<span class="cline-any cline-yes">192x</span>
<span class="cline-any cline-yes">244x</span>
<span class="cline-any cline-yes">244x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">239x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">219x</span>
<span class="cline-any cline-yes">219x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">192x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">892x</span>
<span class="cline-any cline-yes">1550x</span>
<span class="cline-any cline-yes">1550x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">591x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">1192x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-yes">2204x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">704x</span>
<span class="cline-any cline-yes">497x</span>
<span class="cline-any cline-yes">2062x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">21x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var getByClass = require('./utils/get-by-class')
var getAttribute = require('./utils/get-attribute')
var valueNamesUtils = require('./utils/value-names')
&nbsp;
var createCleanTemplateItem = function (templateNode, valueNames) {
var el = templateNode.cloneNode(true)
el.removeAttribute('id')
for (var i = 0, il = valueNames.length; i &lt; il; i++) {
var elm = undefined,
valueName = valueNames[i]
if (valueName.data) {
for (var j = 0, jl = valueName.data.length; j &lt; jl; j++) {
el.setAttribute('data-' + valueName.data[j], '')
}
} else if (valueName.attr &amp;&amp; valueName.name) {
elm = getByClass(el, valueName.name, true)
<span class="missing-if-branch" title="else path not taken" >E</span>if (elm) {
elm.setAttribute(valueName.attr, '')
}
} else {
elm = getByClass(el, valueName, true)
if (elm) {
elm.innerHTML = ''
}
}
}
return el
}
&nbsp;
var stringToDOMElement = function (itemHTML) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof itemHTML !== 'string') <span class="cstat-no" title="statement not covered" >return undefined</span>
if (/&lt;tr[\s&gt;]/g.exec(itemHTML)) {
var tbody = document.createElement('tbody')
tbody.innerHTML = itemHTML
return tbody.firstElementChild
} else <span class="missing-if-branch" title="else path not taken" >E</span>if (itemHTML.indexOf('&lt;') !== -1) {
var div = document.createElement('div')
div.innerHTML = itemHTML
return div.firstElementChild
}
<span class="cstat-no" title="statement not covered" > return undefined</span>
}
&nbsp;
var templater = {}
&nbsp;
templater.getTemplate = function ({ valueNames, parentEl, template }) {
if (typeof template === 'function') {
return {
valueNames,
type: 'dynamic',
render: function (values) {
var item = template(values)
return stringToDOMElement(item)
},
}
}
&nbsp;
var itemSource
if (typeof template === 'string') {
if (template.indexOf('&lt;') === -1) {
itemSource = document.getElementById(template)
} else {
itemSource = stringToDOMElement(template)
}
} else {
var nodes = parentEl.childNodes
for (var i = 0, il = nodes.length; i &lt; il; i++) {
// Only textnodes have a data attribute
if (nodes[i].data === undefined) {
itemSource = nodes[i].cloneNode(true)
break
}
}
}
if (!itemSource)
throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.")
&nbsp;
itemSource = createCleanTemplateItem(itemSource, valueNames)
&nbsp;
return {
valueNames,
render: function (values) {
var el = itemSource.cloneNode(true)
templater.set(el, values, valueNames)
return el
},
}
}
&nbsp;
templater.get = function (el, valueNames) {
var values = {}
for (var i = 0, il = valueNames.length; i &lt; il; i++) {
var valueName = valueNames[i]
if (valueName.data) {
for (var j = 0, jl = valueName.data.length; j &lt; jl; j++) {
values[valueName.data[j]] = getAttribute(el, 'data-' + valueName.data[j])
}
} else if (valueName.attr &amp;&amp; valueName.name) {
var elm = getByClass(el, valueName.name, true)
values[valueName.name] = elm ? getAttribute(elm, valueName.attr) : <span class="branch-1 cbranch-no" title="branch not covered" >''</span>
} else {
var elm = getByClass(el, valueName, true)
values[valueName] = elm ? elm.innerHTML : <span class="branch-1 cbranch-no" title="branch not covered" >''</span>
}
}
return values
}
&nbsp;
templater.set = function (el, values, valueNames) {
for (var v in values) {
<span class="missing-if-branch" title="else path not taken" >E</span>if (values.hasOwnProperty(v)) {
valueNamesUtils.set(el, v, values[v], valueNames)
}
}
}
&nbsp;
templater.create = function (values, template) {
return template.render(values)
}
templater.remove = function (el, parentEl) {
if (el !== undefined &amp;&amp; el.parentNode === parentEl) {
parentEl.removeChild(el)
}
}
templater.show = function (el, parentEl) {
parentEl.appendChild(el)
}
templater.clear = function (parentEl) {
/* .innerHTML = ''; fucks up IE */
if (parentEl.hasChildNodes()) {
while (parentEl.childNodes.length &gt;= 1) {
parentEl.removeChild(parentEl.firstChild)
}
}
}
&nbsp;
module.exports = templater
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Thu Dec 17 2020 00:31:01 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View file

@ -0,0 +1,179 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for to-array.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="index.html">All files</a> to-array.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">76% </span>
<span class="quiet">Statements</span>
<span class='fraction'>19/25</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">59.09% </span>
<span class="quiet">Branches</span>
<span class='fraction'>13/22</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>15/15</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">17x</span>
<span class="cline-any cline-yes">344x</span>
<span class="cline-any cline-yes">344x</span>
<span class="cline-any cline-yes">344x</span>
<span class="cline-any cline-yes">344x</span>
<span class="cline-any cline-yes">344x</span>
<span class="cline-any cline-yes">344x</span>
<span class="cline-any cline-yes">340x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">340x</span>
<span class="cline-any cline-yes">340x</span>
<span class="cline-any cline-yes">41x</span>
<span class="cline-any cline-yes">41x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">340x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">344x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/**
* Source: https://github.com/timoxley/to-array
*
* Convert an array-like object into an `Array`.
* If `collection` is already an `Array`, then will return a clone of `collection`.
*
* @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`
* @return {Array} Naive conversion of `collection` to a new `Array`.
* @api public
*/
&nbsp;
module.exports = function toArray(collection) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof collection === 'undefined') <span class="cstat-no" title="statement not covered" >return []</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if (collection === null) <span class="cstat-no" title="statement not covered" >return [null]</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if (collection === window) <span class="cstat-no" title="statement not covered" >return [window]</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof collection === 'string') <span class="cstat-no" title="statement not covered" >return [collection]</span>
<span class="missing-if-branch" title="if path not taken" >I</span>if (isArray(collection)) <span class="cstat-no" title="statement not covered" >return collection</span>
if (typeof collection.length != 'number') return [collection]
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof collection === 'function' &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >collection instanceof Function)</span> <span class="cstat-no" title="statement not covered" >return [collection]</span>
&nbsp;
var arr = [];
for (var i = 0, il = collection.length; i &lt; il; i++) {
<span class="missing-if-branch" title="else path not taken" >E</span>if (Object.prototype.hasOwnProperty.call(collection, i) || <span class="branch-1 cbranch-no" title="branch not covered" >i in collection)</span> {
arr.push(collection[i])
}
}
if (!arr.length) return []
return arr
}
&nbsp;
function isArray(arr) {
return Object.prototype.toString.call(arr) === '[object Array]'
}
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sat Nov 21 2020 22:28:41 GMT+0100 (Central European Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

File diff suppressed because it is too large Load diff