compat

package
v0.14.49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CSSFeatureToString = map[CSSFeature]string{
	HexRGBA:        "hex-rgba",
	RebeccaPurple:  "rebecca-purple",
	Modern_RGB_HSL: "modern-rgb-hsl",
	InsetProperty:  "inset-property",
	Nesting:        "nesting",
}
View Source
var JSFeatureToString = map[JSFeature]string{
	ArbitraryModuleNamespaceNames: "arbitrary-module-namespace-names",
	ArraySpread:                   "array-spread",
	Arrow:                         "arrow",
	AsyncAwait:                    "async-await",
	AsyncGenerator:                "async-generator",
	Bigint:                        "bigint",
	Class:                         "class",
	ClassField:                    "class-field",
	ClassPrivateAccessor:          "class-private-accessor",
	ClassPrivateBrandCheck:        "class-private-brand-check",
	ClassPrivateField:             "class-private-field",
	ClassPrivateMethod:            "class-private-method",
	ClassPrivateStaticAccessor:    "class-private-static-accessor",
	ClassPrivateStaticField:       "class-private-static-field",
	ClassPrivateStaticMethod:      "class-private-static-method",
	ClassStaticBlocks:             "class-static-blocks",
	ClassStaticField:              "class-static-field",
	ConstAndLet:                   "const-and-let",
	DefaultArgument:               "default-argument",
	Destructuring:                 "destructuring",
	DynamicImport:                 "dynamic-import",
	ExponentOperator:              "exponent-operator",
	ExportStarAs:                  "export-star-as",
	ForAwait:                      "for-await",
	ForOf:                         "for-of",
	Generator:                     "generator",
	Hashbang:                      "hashbang",
	ImportAssertions:              "import-assertions",
	ImportMeta:                    "import-meta",
	LogicalAssignment:             "logical-assignment",
	NestedRestBinding:             "nested-rest-binding",
	NewTarget:                     "new-target",
	NodeColonPrefixImport:         "node-colon-prefix-import",
	NodeColonPrefixRequire:        "node-colon-prefix-require",
	NullishCoalescing:             "nullish-coalescing",
	ObjectAccessors:               "object-accessors",
	ObjectExtensions:              "object-extensions",
	ObjectRestSpread:              "object-rest-spread",
	OptionalCatchBinding:          "optional-catch-binding",
	OptionalChain:                 "optional-chain",
	RegexpDotAllFlag:              "regexp-dot-all-flag",
	RegexpLookbehindAssertions:    "regexp-lookbehind-assertions",
	RegexpMatchIndices:            "regexp-match-indices",
	RegexpNamedCaptureGroups:      "regexp-named-capture-groups",
	RegexpStickyAndUnicodeFlags:   "regexp-sticky-and-unicode-flags",
	RegexpUnicodePropertyEscapes:  "regexp-unicode-property-escapes",
	RestArgument:                  "rest-argument",
	TemplateLiteral:               "template-literal",
	TopLevelAwait:                 "top-level-await",
	TypeofExoticObjectIsObject:    "typeof-exotic-object-is-object",
	UnicodeEscapes:                "unicode-escapes",
}
View Source
var StringToCSSFeature = map[string]CSSFeature{
	"hex-rgba":       HexRGBA,
	"rebecca-purple": RebeccaPurple,
	"modern-rgb-hsl": Modern_RGB_HSL,
	"inset-property": InsetProperty,
	"nesting":        Nesting,
}
View Source
var StringToJSFeature = map[string]JSFeature{
	"arbitrary-module-namespace-names": ArbitraryModuleNamespaceNames,
	"array-spread":                     ArraySpread,
	"arrow":                            Arrow,
	"async-await":                      AsyncAwait,
	"async-generator":                  AsyncGenerator,
	"bigint":                           Bigint,
	"class":                            Class,
	"class-field":                      ClassField,
	"class-private-accessor":           ClassPrivateAccessor,
	"class-private-brand-check":        ClassPrivateBrandCheck,
	"class-private-field":              ClassPrivateField,
	"class-private-method":             ClassPrivateMethod,
	"class-private-static-accessor":    ClassPrivateStaticAccessor,
	"class-private-static-field":       ClassPrivateStaticField,
	"class-private-static-method":      ClassPrivateStaticMethod,
	"class-static-blocks":              ClassStaticBlocks,
	"class-static-field":               ClassStaticField,
	"const-and-let":                    ConstAndLet,
	"default-argument":                 DefaultArgument,
	"destructuring":                    Destructuring,
	"dynamic-import":                   DynamicImport,
	"exponent-operator":                ExponentOperator,
	"export-star-as":                   ExportStarAs,
	"for-await":                        ForAwait,
	"for-of":                           ForOf,
	"generator":                        Generator,
	"hashbang":                         Hashbang,
	"import-assertions":                ImportAssertions,
	"import-meta":                      ImportMeta,
	"logical-assignment":               LogicalAssignment,
	"nested-rest-binding":              NestedRestBinding,
	"new-target":                       NewTarget,
	"node-colon-prefix-import":         NodeColonPrefixImport,
	"node-colon-prefix-require":        NodeColonPrefixRequire,
	"nullish-coalescing":               NullishCoalescing,
	"object-accessors":                 ObjectAccessors,
	"object-extensions":                ObjectExtensions,
	"object-rest-spread":               ObjectRestSpread,
	"optional-catch-binding":           OptionalCatchBinding,
	"optional-chain":                   OptionalChain,
	"regexp-dot-all-flag":              RegexpDotAllFlag,
	"regexp-lookbehind-assertions":     RegexpLookbehindAssertions,
	"regexp-match-indices":             RegexpMatchIndices,
	"regexp-named-capture-groups":      RegexpNamedCaptureGroups,
	"regexp-sticky-and-unicode-flags":  RegexpStickyAndUnicodeFlags,
	"regexp-unicode-property-escapes":  RegexpUnicodePropertyEscapes,
	"rest-argument":                    RestArgument,
	"template-literal":                 TemplateLiteral,
	"top-level-await":                  TopLevelAwait,
	"typeof-exotic-object-is-object":   TypeofExoticObjectIsObject,
	"unicode-escapes":                  UnicodeEscapes,
}

Functions

This section is empty.

Types

type CSSFeature added in v0.7.9

type CSSFeature uint8
const (
	HexRGBA CSSFeature = 1 << iota

	RebeccaPurple

	// This feature includes all of the following:
	// - Allow floats in rgb() and rgba()
	// - hsl() can accept alpha values
	// - rgb() can accept alpha values
	// - Space-separated functional color notations
	Modern_RGB_HSL

	InsetProperty
	Nesting
)

func UnsupportedCSSFeatures added in v0.7.9

func UnsupportedCSSFeatures(constraints map[Engine][]int) (unsupported CSSFeature)

Return all features that are not available in at least one environment

func (CSSFeature) ApplyOverrides added in v0.14.46

func (features CSSFeature) ApplyOverrides(overrides CSSFeature, mask CSSFeature) CSSFeature

func (CSSFeature) Has added in v0.7.9

func (features CSSFeature) Has(feature CSSFeature) bool

type Engine

type Engine uint8
const (
	Chrome Engine = iota
	Edge
	ES
	Firefox
	Hermes
	IE
	IOS
	Node
	Opera
	Rhino
	Safari
)

func (Engine) String added in v0.9.3

func (e Engine) String() string

type JSFeature added in v0.7.9

type JSFeature uint64
const (
	ArbitraryModuleNamespaceNames JSFeature = 1 << iota
	ArraySpread
	Arrow
	AsyncAwait
	AsyncGenerator
	Bigint
	Class
	ClassField
	ClassPrivateAccessor
	ClassPrivateBrandCheck
	ClassPrivateField
	ClassPrivateMethod
	ClassPrivateStaticAccessor
	ClassPrivateStaticField
	ClassPrivateStaticMethod
	ClassStaticBlocks
	ClassStaticField
	ConstAndLet
	DefaultArgument
	Destructuring
	DynamicImport
	ExponentOperator
	ExportStarAs
	ForAwait
	ForOf
	Generator
	Hashbang
	ImportAssertions
	ImportMeta
	LogicalAssignment
	NestedRestBinding
	NewTarget
	NodeColonPrefixImport
	NodeColonPrefixRequire
	NullishCoalescing
	ObjectAccessors
	ObjectExtensions
	ObjectRestSpread
	OptionalCatchBinding
	OptionalChain
	RegexpDotAllFlag
	RegexpLookbehindAssertions
	RegexpMatchIndices
	RegexpNamedCaptureGroups
	RegexpStickyAndUnicodeFlags
	RegexpUnicodePropertyEscapes
	RestArgument
	TemplateLiteral
	TopLevelAwait
	TypeofExoticObjectIsObject
	UnicodeEscapes
)

func UnsupportedJSFeatures added in v0.7.9

func UnsupportedJSFeatures(constraints map[Engine][]int) (unsupported JSFeature)

Return all features that are not available in at least one environment

func (JSFeature) ApplyOverrides added in v0.14.46

func (features JSFeature) ApplyOverrides(overrides JSFeature, mask JSFeature) JSFeature

func (JSFeature) Has added in v0.7.9

func (features JSFeature) Has(feature JSFeature) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL