source: trip-planner-front/node_modules/webpack-dev-middleware/node_modules/ajv/lib/dot/multipleOf.jst@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 644 bytes
Line 
1{{# def.definitions }}
2{{# def.errors }}
3{{# def.setupKeyword }}
4{{# def.$data }}
5
6{{# def.numberKeyword }}
7
8var division{{=$lvl}};
9if ({{?$isData}}
10 {{=$schemaValue}} !== undefined && (
11 typeof {{=$schemaValue}} != 'number' ||
12 {{?}}
13 (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}},
14 {{? it.opts.multipleOfPrecision }}
15 Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}}
16 {{??}}
17 division{{=$lvl}} !== parseInt(division{{=$lvl}})
18 {{?}}
19 )
20 {{?$isData}} ) {{?}} ) {
21 {{# def.error:'multipleOf' }}
22} {{? $breakOnError }} else { {{?}}
Note: See TracBrowser for help on using the repository browser.