πŸš€ DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more β†’
Socket
Book a DemoInstallSign in
Socket

@markuplint/types

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markuplint/types

Type declaration and value checker

npmnpm
Version
4.0.0-dev.12
Version published
Weekly downloads
38K
1.96%
Maintainers
1
Weekly downloads
Β 
Created
Source

@markuplint/types

npm version

Type declaration and value checker

Type declaration

  • types.schema.json

API

import { check } from '@markuplint/types';

check('2020-01-01', 'DateTime');
// => { matched: true }

check('2020-02-30', 'DateTime');
// => {
// 	matched: false,
// 	reason: { type: 'out-of-range', gte: 1, lte: 29 },
// 	expects: [],
// 	partName: 'date',
// 	ref: 'https://html.spec.whatwg.org/multipage/text-level-semantics.html#datetime-value',
// 	raw: '30',
// 	offset: 8,
// 	length: 2,
// 	line: 1,
// 	column: 9,
// }

Type Identifiers

IdentifierUse onSpecSupported
AnySome attributesβœ…
NoEmptyAnySome attributesβœ…
OneLineAnySome attributesβœ…
ZeroSome attributesβœ…
NumberSome attributesβœ…
UintSome attributesβœ…
XMLNamesvg|[attributeName] and moreXMLβœ…
DOMIDThe id attribute and moreWHATWGβœ…
FunctionBodyEvent handler attributes🚧
Patterninput[pattern]WHATWGβœ…
DateTimetime[datetime] and moreWHATWGβœ…
TabIndexThe tabindex attributeWHATWGβœ…
BCP47The lang attribute and moreRFCβœ…
URLSome attributesWHATWGβœ…
AbsoluteURLThe itemtype attribute (as list)WHATWGβœ…
HashNameimg[usemap]WHATWGβœ…
OneCodePointCharThe accesskey attribute (as list)WHATWGβœ…
CustomElementNameThe is attributeWHATWGβœ…
BrowsingContextNameUse NavigableTargetName instead.Obsolatedβœ…
BrowsingContextNameOrKeywordUse NavigableTargetNameOrKeyword instead.Obsolatedβœ…
NavigableTargetNameiframe[name] and moreWHATWGβœ…
NavigableTargetNameOrKeyworda[target] and moreWHATWGβœ…
HTTPSchemaURLa[ping] (as list) and moreWHATWGβœ…
MIMETypeembed[type] and moreWHATWGβœ…
ItemPropThe itemprop attribute (as list)WHATWGβœ…
Srcsetimg[srcset] and moreWHATWGβœ…
SourceSizeListimg[sizes] and moreWHATWGβœ…
IconSizelink[sizes] (as list)WHATWGβœ…
AutoCompleteinput[autocomplete] and moreWHATWGβœ…
Acceptinput[accept]WHATWGβœ…
SerializedPermissionsPolicyiframe[allow]W3Cβœ…
<css-declaration-list>The style attributeCSSβœ…
<class-list>The class attributeSVGβœ…
<svg-font-size>Some attributes for SVGCSS🚧
<svg-font-size-adjust>Some attributes for SVGCSS🚧
<'color-profile'>Some attributes for SVGSVG🚧
<'color-rendering'>Some attributes for SVGSVG🚧
<'enable-background'>Some attributes for SVGSVG🚧
<list-of-svg-feature-string>Some attributes for SVGSVG🚧
<animatable-value>Some attributes for SVGSVG🚧
<begin-value-list>Some attributes for SVGSVG🚧
<end-value-list>Some attributes for SVGSVG🚧
<list-of-value>Some attributes for SVGSVG🚧
<clock-value>Some attributes for SVGSMIL🚧
<color-matrix>Some attributes for SVGW3Cβœ…
<dasharray>Some attributes for SVGSVGβœ…
<key-points>Some attributes for SVGSVGβœ…
<key-splines>Some attributes for SVGSVGβœ…
<key-times>Some attributes for SVGSVGβœ…
<system-language>Some attributes for SVGSVGβœ…
<origin>Some attributes for SVGSMILβœ…
<svg-path>Some attributes for SVGSVG🚧
<points>Some attributes for SVGSVGβœ…
<preserve-aspect-ratio>Some attributes for SVGSVGβœ…
<view-box>Some attributes for SVGSVGβœ…
<rotate>Some attributes for SVGSVGβœ…
<text-coordinate>Some attributes for SVGSVGβœ…
<list-of-lengths>Some attributes for SVGβœ…
<list-of-numbers>Some attributes for SVGβœ…
<list-of-percentages>Some attributes for SVGβœ…
<number-optional-number>Some attributes for SVGβœ…

In addition, you can use types CSSTree defined.

Install

$ npm install @markuplint/types

$ yarn add @markuplint/types

FAQs

Package last updated on 24 Jan 2024

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