NAME

Skilletor::JSString - String operations as JavaScript performs them

VERSION

version 0.001

SYNOPSIS

use Skilletor::JSString qw( js_lc js_trim );

js_lc('ΟΔΟΣ');        # 'οδος' with a final sigma, as toLowerCase gives it
js_trim("\x{FEFF} x ");  # 'x'

DESCRIPTION

The reference implementation lower-cases item names, trims specs and tests whitespace with JavaScript's string methods; where Perl's builtins differ, a name or a message would differ. These functions are the JavaScript behaviour.

js_lc

String.prototype.toLowerCase.

js_trim

String.prototype.trim.

js_blank

True when js_trim leaves nothing.

js_ws_re

The compiled character class of JavaScript's \s.

SUPPORT

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.