This document describes version 0.03 of String::JS (from Perl distribution String-JS), released on 2016-03-11.
If $mode is set to 1, will produce literal representation using single quotes (') instead.
If $mode is set to 2, will produce single-quoted JS string to be put inside a double-quoted JS string literal, useful for producing for example jQuery expression like:
$("h2.contains('this is JS string inside another JS string')")
Will die on failure.
Currently implemented using JSON decoding of stringified $js_str.
Please visit the project's homepage at https://metacpan.org/release/String-JS.
Source repository is at https://github.com/perlancar/perl-String-JS.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=String-JS
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
This software is copyright (c) 2016 by email@example.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install String::JS, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.