quick-enums 0.1.1

Shorthand for string enums

Released 2017-11-30.

To install, run:

haxelib install quick-enums 0.1.1

See using Haxelib in Haxelib documentation for more information.

Maintainerkevinresol
Websitehttps://github.com/kevinresol/quick-enums
Current version0.1.1
StatisticsInstalled 3 times
LicenseMIT
Tags

README.md

Quick Enums for Haxe

Shorthand to represent string-enums. Useful for externs.

Usage

var sizes:enums.Enums<'small', 'medium', 'large'>;

Will generate this:

var sizes:Enum1;

@:enum abstract Enum1(String) {
	var Small = 'small';
	var Medium = 'medium';
	var Large = 'large';
}

Note

When generating the identifiers:

  • Dashes - and spaces will be replaced by an underscore _
  • If the string starts with a number, the identifier will be prefixed with an underscore _