NAME

Skilletor::JSString - String operations as JavaScript performs them

VERSION

version 0.008000

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

Issues

Please report bugs and feature requests at https://github.com/Getty/skilletor/issues.

CONTRIBUTING

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

AUTHOR

Torsten Raudssus <torsten@raudssus.de>

COPYRIGHT AND LICENSE

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

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)