New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dryvjs

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dryvjs - npm Package Compare versions

Comparing version 1.0.0-pre-33 to 1.0.0-pre-34

2

dist/core/annotate.d.ts

@@ -1,2 +0,2 @@

import type { DryvOptions, DryvProxy, DryvValidationRuleSet } from './typings';
import { DryvOptions, DryvProxy, DryvValidationRuleSet } from './typings';
export declare function annotate<TModel extends object>(model: DryvProxy<TModel>, ruleSet: DryvValidationRuleSet<TModel>, options: DryvOptions): void;
import { isDryvValidatable } from './';
export function annotate(model, ruleSet, options) {
annotateObject(model.$validatable, ruleSet, options);
annotateDryvObject(model.$validatable.value, ruleSet, options);
}
function annotateObject(validatable, ruleSet, options) {
function annotateDryvObject(dryvObject, ruleSet, options) {
var _a;
const model = validatable.value;
for (const key in model) {
for (const key in dryvObject) {
if ((_a = options.excludedFields) === null || _a === void 0 ? void 0 : _a.find((regexp) => regexp.test(key))) {
continue;
}
const value = model[key];
const value = dryvObject[key];
if (isDryvValidatable(value)) {
annotateValidatable(value, ruleSet);
}
if (typeof value === 'object') {
annotateObject(value, ruleSet, options);
else if (typeof value === 'object') {
annotateDryvObject(value, ruleSet, options);
}

@@ -23,4 +22,5 @@ }

var _a, _b;
validatable.required = !!((_b = (_a = ruleSet.validators) === null || _a === void 0 ? void 0 : _a[validatable.field]) === null || _b === void 0 ? void 0 : _b.find((rule) => { var _a; return (_a = rule.annotations) === null || _a === void 0 ? void 0 : _a.required; }));
console.log('***', validatable.path);
validatable.required = !!((_b = (_a = ruleSet.validators) === null || _a === void 0 ? void 0 : _a[validatable.path]) === null || _b === void 0 ? void 0 : _b.find((rule) => { var _a; return (_a = rule.annotations) === null || _a === void 0 ? void 0 : _a.required; }));
}
//# sourceMappingURL=annotate.js.map
{
"name": "dryvjs",
"version": "1.0.0-pre-33",
"version": "1.0.0-pre-34",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc