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

@galaxar/types

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@galaxar/types

Galaxar Semantic Data Types

  • 1.1.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Semantic Types

Conventions

Type Interface

name: "type name",
alias: ["type alias"],
defaultValue: null,

sanitize: (value, meta, i18n, path) => sanitized,
serialize: (value, meta) => string

Common Type Meta

  • {boolean} rawValue - Keep raw value, do not transform
  • {boolean} optional - No error throw if value is null and default is null
  • {any} default = Default value if value is null

Enumerable Types

  • bigint
  • integer
  • number
  • text

Validation Error

  • message
  • status = 400
  • code = E_INVALID_DATA
  • info = { value, meta, [i18n], [path] }

Plugins

  • datetimeParser
  • bigintWriter
  • preProcess - [sync/async] (value, meta, opts: { rawValue, i18n, path }) => [ finished, processedValue ] or [ false ]
  • postProcess - [sync/async] (value, meta, opts: { rawValue, i18n, path }) => processedValue

Note: if preProcess or postProcess is async function, sanitize_ should be called instead of sanitize

Keywords

FAQs

Package last updated on 01 Jul 2023

Did you know?

Socket

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.

Install

Related posts

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