NAME

Data::Sah::Compiler::js - Compile Sah schema to JavaScript code

VERSION

This document describes version 0.87 of Data::Sah::Compiler::js (from Perl distribution Data-Sah-JS), released on 2016-09-14.

SYNOPSIS

# see Data::Sah

DESCRIPTION

Derived from Data::Sah::Compiler::Prog.

DEVELOPER NOTES

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) })

METHODS

new() => OBJ

$c->compile(%args) => RESULT

Aside from Prog's arguments, this class supports these arguments:

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Data-Sah-JS.

SOURCE

Source repository is at https://github.com/perlancar/perl-Data-Sah-JS.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Sah-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.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 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.