Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@travetto/schema

Package Overview
Dependencies
Maintainers
0
Versions
323
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/schema - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

6

package.json
{
"name": "@travetto/schema",
"version": "5.0.0",
"version": "5.0.1",
"description": "Data type registry for runtime validation, reflection and binding.",

@@ -30,6 +30,6 @@ "keywords": [

"dependencies": {
"@travetto/registry": "^5.0.0"
"@travetto/registry": "^5.0.1"
},
"peerDependencies": {
"@travetto/transformer": "^5.0.0"
"@travetto/transformer": "^5.0.1"
},

@@ -36,0 +36,0 @@ "peerDependenciesMeta": {

@@ -461,4 +461,20 @@ import { Class, AppError, describeFunction, castTo, classConstruct, asFull, castKey } from '@travetto/runtime';

}
/**
* Visit fields recursively
*/
visitFields<T>(cls: Class<T>, onField: (field: FieldConfig, path: FieldConfig[]) => void, _path: FieldConfig[] = [], root = cls): void {
const fields = this.has(cls) ?
Object.values(this.getViewSchema(cls).schema) :
[];
for (const field of fields) {
if (this.has(field.type)) {
this.visitFields(field.type, onField, [..._path, field], root);
} else {
onField(field, _path);
}
}
}
}
export const SchemaRegistry = new $SchemaRegistry();
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