Group
Extension

Matches 1

String-JS ( P/PE/PERLANCAR/String-JS-0.03.tar.gz, PERLANCAR, 2016; MetaCPAN )
String-JS/lib/String/JS.pm ( view source; MetaCPAN )
 DATE
our $VERSION = '0.03'; # VERSION

use 5.010001;
use strict;
use warnings;

use JSON::MaybeXS;
my $json = JSON::MaybeXS->new->allow_nonref;

use Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK 
2";
        }
    } else {
        return $json->encode("$str");
    }
}

sub decode_js_string {
    my $str = shift;
    if ($str =~ /\A"/o) {
        $json->decode($str);
    } elsif ($str =~ /\A'/o
JavaScript literal representation using double
quotes (C<">). This is currently implemented using JSON encoding.

If C<$mode> is set to 1, will produce literal representation using single quotes
(C<'>

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.