Skip to content

Latest commit

 

History

History
19 lines (10 loc) · 707 Bytes

README.md

File metadata and controls

19 lines (10 loc) · 707 Bytes

A package to help manage enums.

DISCLAIMER: I wrote this package to learn how to write packages while solving a simple problem.

This package is used in ijsnow:enum-manager.

meteor add ijsnow:enum-object

EnumObject API

EnumObject.map(in)

in is a string if you want to map to the key, or it is a number if you want to map to the value.

Generally, pass the value to be mapped to the key if you are inserting into the database and pass the key to be mapped to the value if you are reading the object out of the database for a view on the client.

EnumObject.values()

Returns array with the values in the enum.