Data::Sah::Compiler::js - Compile Sah schema to JavaScript code
This document describes version 0.69 of Data::Sah::Compiler::js (from Perl distribution Data-Sah), released on 2015-07-08.
# see Data::Sah
Derived from Data::Sah::Compiler::Prog.
Aside from Prog's arguments, this class supports these arguments:
To generate expression code that says "all subexpression must be true", you can do:
ARRAY.every(function(x) { return blah(x) })
which shortcuts to false after the first item failure.
To say "at least one subexpression must be true":
!ARRAY.every(function(x) { return !blah(x) })
Please visit the project's homepage at https://metacpan.org/release/Data-Sah.
Source repository is at https://github.com/perlancar/perl-Data-Sah.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Sah
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.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2015 by perlancar@cpan.org.
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 Data::Sah, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Sah
CPAN shell
perl -MCPAN -e shell install Data::Sah
For more information on module installation, please visit the detailed CPAN module installation guide.