main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
573 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | module.exports = function generate_comment(it, $keyword, $ruleType) {
|
---|
3 | var out = ' ';
|
---|
4 | var $schema = it.schema[$keyword];
|
---|
5 | var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
|
---|
6 | var $breakOnError = !it.opts.allErrors;
|
---|
7 | var $comment = it.util.toQuotedString($schema);
|
---|
8 | if (it.opts.$comment === true) {
|
---|
9 | out += ' console.log(' + ($comment) + ');';
|
---|
10 | } else if (typeof it.opts.$comment == 'function') {
|
---|
11 | out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';
|
---|
12 | }
|
---|
13 | return out;
|
---|
14 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.