@expo/schemer
- Version 1.5.2
- Published
- 31.7 kB
- 4 dependencies
- MIT license
Install
npm i @expo/schemer
yarn add @expo/schemer
pnpm add @expo/schemer
Overview
Centralized scheme validation library for Expo
Index
Variables
Classes
Type Aliases
Variables
variable ErrorCodes
const ErrorCodes: { SCHEMA_VALIDATION_ERROR: string; SCHEMA_ADDITIONAL_PROPERTY: string; SCHEMA_MISSING_REQUIRED_PROPERTY: string; SCHEMA_INVALID_PATTERN: string; SCHEMA_INVALID_NOT: string; INVALID_ASSET_URI: string; INVALID_DIMENSIONS: string; INVALID_CONTENT_TYPE: string; NOT_SQUARE: string; FILE_EXTENSION_MISMATCH: string;};
Classes
class Schemer
class Schemer {}
constructor
constructor(schema: {}, options?: any);
property ajv
ajv: Ajv;
property manualValidationErrors
manualValidationErrors: ValidationError[];
property options
options: any;
property rootDir
rootDir: string;
property schema
schema: {};
method getErrors
getErrors: () => ValidationError[];
method validateAll
validateAll: (data: any) => Promise<void>;
method validateAssetsAsync
validateAssetsAsync: (data: any) => Promise<void>;
method validateIcon
validateIcon: (iconPath: string) => Promise<void>;
method validateName
validateName: (name: string) => Promise<void>;
method validateProperty
validateProperty: (fieldPath: string, data: any) => Promise<void>;
method validateSchemaAsync
validateSchemaAsync: (data: any) => Promise<void>;
method validateSdkVersion
validateSdkVersion: (version: string) => Promise<void>;
method validateSlug
validateSlug: (slug: string) => Promise<void>;
class SchemerError
class SchemerError extends Error {}
constructor
constructor(errors: ValidationError[]);
property errors
errors: ValidationError[];
property name
readonly name: string;
class ValidationError
class ValidationError extends Error {}
constructor
constructor({ errorCode, fieldPath, message, data, meta,}: { errorCode: ErrorCode; fieldPath: string; message: string; data: any; meta: any;});
property data
data: any;
property errorCode
errorCode: string;
property fieldPath
fieldPath: string;
property meta
meta: any;
property name
readonly name: string;
Type Aliases
type ErrorCode
type ErrorCode = keyof typeof ErrorCodes;
Package Files (2)
Dependencies (4)
Dev Dependencies (2)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@expo/schemer
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@expo/schemer)
- HTML<a href="https://www.jsdocs.io/package/@expo/schemer"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3618 ms. - Missing or incorrect documentation? Open an issue for this package.