File Coverage

blib/lib/WWW/Shopify/Liquid/Dialect/Web/Filter/EscapeJS.pm
Criterion Covered Total %
statement 9 15 60.0
branch 0 2 0.0
condition n/a
subroutine 3 6 50.0
pod 0 3 0.0
total 12 26 46.1


line stmt bran cond sub pod time code
1              
2 1     1   7427 use strict;
  1         3  
  1         42  
3 1     1   9 use warnings;
  1         3  
  1         63  
4              
5             package WWW::Shopify::Liquid::Dialect::Web::Filter::EscapeJS;
6 1     1   9 use base 'WWW::Shopify::Liquid::Filter';
  1         3  
  1         298  
7              
8 0     0 0   sub min_arguments { return 0; }
9 0     0 0   sub max_arguments { return 0; }
10             sub operate {
11 0     0 0   my ($self, $hash, $operand) = @_;
12 0 0         return undef unless $operand;
13 0           $operand =~ s/"/\\"/g;
14 0           return $operand;
15             }
16              
17             1;