Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
metaschema
Advanced tools
Metadata Schema and Interface Definition Language (IDL)
$ npm install metaschema
schemas
: <Schema[]>
config
: <Object>
prepare
: <Function>
ms
: <Metaschema>
resolve
: <Function>
ms
: <Metaschema>
type
: <string>
name
: <string>
<Schema>
processors
: <Object>
[type]
: <Object>
preprocess
: <Function[]>
optional
schema
: <Schema>
<Error[]>
validateSchema
: <Function[]>
optional
schema
: <Schema>
<Error[]>
add
: <Function[]>
schema
: <Schema>
ms
: <Metaschema>
<Error[]>
postprocess
: <Function[]>
optional
schema
: <Schema>
ms
: <Metaschema>
<Error[]>
serialize
: <Function>
optional
schema
: <Schema>
ms
: <Metaschema>
<string>
validateInstance
: <Function>
optional
ms
: <Metaschema>
schema
: <Schema>
instance
: <any>
options
: <Object>
<Error[]>
creator
: <Function>
optional
ms
: <Metaschema>
schema
: <Schema>
args
: <any>
options
: <Object>
<Error[]>
, <any>
]processOrder:
: <Function>
|<Object>
function is
passed to Array.prototype.sort (a: <Schema>
, b: <Schema>
) =>
<number>
. If <Object>
is provided it would be used
as map from schema type (<string>
) to order value
(<number>
), types with lower values are processed earlier.Returns: <Metaschema>
Creates Metaschema object and fills it with schemas
type
: <string>
schema
: <string>
|<Schema>
schema or path, that can be resolved
by config.resolveinstance
: <any>
options
: <Object>
Validates an instance of a given type against a schema
type
: <string>
schema
: <string>
|<Schema>
schema or path, that can be resolved
by config.resolveinstance
: <any>
options
: <Object>
Returns: <any>
Creates an instance of given schema
schemas
: <Schema>
|<Schema[]>
Adds multiple schemas
dir
: <string>
|<string[]>
options
: <Object>
context
: <Object>
decorators
: <Object>
localDecorators
: <Object>
optional
[type]
: <Object>
decorators specific for this schema typepathToType
: <Object>
[ext]
: <string>
pathToType
: <Function>
path
: <string>
<string>
preprocessor:
: <Function>
optional
schemas
: <Schema[]>
<Schema[]>
config
: <Object>
prepare
: <Function>
ms
: <Metaschema>
resolve
: <Function>
ms
: <Metaschema>
path
: <string>
<Schema>
processors
: <Object>
[type]
: <Object>
preprocess
: <Function[]>
optional
schema
: <Schema>
<Error[]>
validateSchema
: <Function[]>
optional
schema
: <Schema>
<Error[]>
add
: <Function>
schema
: <Schema>
ms
: <Metaschema>
<Error[]>
postprocess
: <Function[]>
optional
schema
: <Schema>
ms
: <Metaschema>
<Error[]>
serialize
: <Function>
optional
schema
: <Schema>
ms
: <Metaschema>
<string>
validateInstance
: <Function>
optional
ms
: <Metaschema>
schema
: <Schema>
instance
: <any>
options
: <Object>
<Error[]>
creator
: <Function>
optional
ms
: <Metaschema>
schema
: <Schema>
args
: <any>
options
: <Object>
<Error[]>
, <any>
]processOrder:
: <Function>
|<Object>
function is
passed to Array.prototype.sort (a: <Schema>
, b: <Schema>
) =>
<number>
. If <Object>
is provided it would be used
as map from schema type (<string>
) to order value
(<number>
), types with lower values are processed earlier.Returns: <Metaschema>
Creates Metaschema object and fills it with schemas
path
: <string>
path to the system schemasystemConfig
: <Object>
options
: <Object>
config
: <Object>
prepare
: <Function>
ms
: <Metaschema>
resolve
: <Function>
ms
: <Metaschema>
path
: <string>
<Schema>
processors
: <Object>
[type]
: <Object>
add
: <Function>
schema
: <Schema>
ms
: <Metaschema>
<Error[]>
postprocess
: <Function>
optional
schema
: <Schema>
ms
: <Metaschema>
<Error[]>
validateInstance
: <Function>
optional
ms
: <Metaschema>
schema
: <Schema>
instance
: <any>
options
: <Object>
<Error[]>
processOrder:
: <Function>
|<Object>
function is
passed to Array.prototype.sort (a: <Schema>
, b: <Schema>
) =>
<number>
. If <Object>
is provided it would be used
as map from schema type (<string>
) to order value
(<number>
), types with lower values are processed earlier.oldConfig
: <Object>
options
: <Object>
config
: <Object>
prepare
: <Function>
ms
: <Metaschema>
resolve
: <Function>
ms
: <Metaschema>
path
: <string>
<Schema>
processors
: <Object>
[type]
: <Object>
add
: <Function>
schema
: <Schema>
ms
: <Metaschema>
<Error[]>
postprocess
: <Function>
optional
schema
: <Schema>
ms
: <Metaschema>
<Error[]>
validateInstance
: <Function>
optional
ms
: <Metaschema>
schema
: <Schema>
instance
: <any>
options
: <Object>
<Error[]>
processOrder:
: <Function>
|<Object>
function is
passed to Array.prototype.sort (a: <Schema>
, b: <Schema>
) =>
<number>
. If <Object>
is provided it would be used
as map from schema type (<string>
) to order value
(<number>
), types with lower values are processed earlier.Returns: newConfig <Object>
Create a config to validate schemas according to the system schema
Function decorators
Function decorators
name
: <string>
schema namesource
: <string>
schema sourceoptions
: <Object>
evaluator
: <Function>
function to be used to evaluate schemaReturns: <Object>
processed schema
Process schema source
schema
: <Object>
Returns: <string>
Extracts schema decorator
definition
: <Object>
schema definition in a form similar to
categorypath
: <string>
path to a a nested property, if it starts with
::
substring between ::
and .
would be treated as category namems
: <Metaschema>
source
: <string>
source for error reportingReturns: <Object>
Extract definition of a nested property
FAQs
Metadata Schema and Interface Definition Language (IDL)
The npm package metaschema receives a total of 165 weekly downloads. As such, metaschema popularity was classified as not popular.
We found that metaschema demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.