Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/vicis/mod.ts>Vicis

Presentation and transformation layer for data output in RESTful APIs.
Latest
class Vicis
import { Vicis } from "https://deno.land/x/vicis@1.0.0/mod.ts";

Constructors

new
Vicis(config?: IConfig, data?: IObject)

Methods

protected
validateConfig()
protected
validateData()
cast(propertyToType?: ICast)
config(config?: IConfig)
data(dataToSerialize: IObject): Vicis
defaults(propertyDefaultValues?: IDefaults)
defined(propertiesMustBeDefined?: IDefined)
exclude(propertiesToExclude?: IExclude)
fromArray(collection: IObject[]): IObject[]
omit(propertiesToOmit?: IOmit)
order(propertiesToStreamline?: IOrder)
pick(propertiesToPick?: IPick)
rename(renamePropertyFromTo?: IRename)
replace(replacePropertyValues?: IReplace)
required(propertiesRequired?: IRequired)
sort(sortProperties?: boolean | ESort): Vicis
toString(): string
transform(propertyValueTransformWith?: ITransform): Vicis

Static Properties

readonly
BOOLEAN: ECastType
readonly
FLAG: ECastType
readonly
INTEGER: ECastType
readonly
JSON: ECastType
readonly
NUMERIC: ECastType
readonly
STRING: ECastType

Static Methods

factory(config?: IConfig, data?: IObject)
from(data: IObject, config?: IConfig)
fromArray(collection: IObject[], config?: IConfig)