Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
nodejs /
ajv /
lib /
compile /
validate /
Delete
Unzip
Name
Size
Permission
Date
Action
applicability.ts
739
B
-rw-r--r--
2023-12-16 08:36
boolSchema.ts
1.27
KB
-rw-r--r--
2023-12-16 08:36
dataType.ts
6.85
KB
-rw-r--r--
2023-12-16 08:36
defaults.ts
1.19
KB
-rw-r--r--
2023-12-16 08:36
index.ts
18.99
KB
-rw-r--r--
2023-12-16 08:36
keyword.ts
5.21
KB
-rw-r--r--
2023-12-16 08:36
subschema.ts
4.26
KB
-rw-r--r--
2023-12-16 08:36
Save
Rename
import type {SchemaObjCxt} from ".." import {_, getProperty, stringify} from "../codegen" import {checkStrictMode} from "../util" export function assignDefaults(it: SchemaObjCxt, ty?: string): void { const {properties, items} = it.schema if (ty === "object" && properties) { for (const key in properties) { assignDefault(it, key, properties[key].default) } } else if (ty === "array" && Array.isArray(items)) { items.forEach((sch, i: number) => assignDefault(it, i, sch.default)) } } function assignDefault(it: SchemaObjCxt, prop: string | number, defaultValue: unknown): void { const {gen, compositeRule, data, opts} = it if (defaultValue === undefined) return const childData = _`${data}${getProperty(prop)}` if (compositeRule) { checkStrictMode(it, `default is ignored for: ${childData}`) return } let condition = _`${childData} === undefined` if (opts.useDefaults === "empty") { condition = _`${condition} || ${childData} === null || ${childData} === ""` } // `${childData} === undefined` + // (opts.useDefaults === "empty" ? ` || ${childData} === null || ${childData} === ""` : "") gen.if(condition, _`${childData} = ${stringify(defaultValue)}`) }