EnumSet functionality in Javascript
A enum set for smpoo tframe
Canonical enum set for Genfeed domains (models, workflows, content, billing, and more).
Transform TypeScript `const` enums
A TypeScript string enum for compile-time safety when working with event.key
TypeScript Enum Utilities
Shareable commitlint config enforcing conventional commits
Common types package
Walks your node_modules tree
gRPC utility library for loading .proto files
A plugin for enum-plus that supports internationalization of enums through i18next
A plugin for enum-plus that supports internationalization of enums through react-i18next
Shareable commitlint config enforcing the angular commit convention types
Set a function's length property
A helper to optimistically set Symbol.toStringTag, when possible.
Set a function's name property
A plugin for enum-plus that supports internationalization of enums through i18next-vue
Lightweight timezone enum for JavaScript or TypeScript.
Enum utilities for typescript, inspired by flow enums
Robustly set the [[Prototype]] of an object
Enum is a javascript module that introduces the Enum Type. It works for node.js, in the browser and for deno.
An utility library to get all values/keys of a Typescript enum
A TypeScript enum definition that maps human-friendly key names to JavaScript key codes
Toptal Graphql codegen extensions
A structure for holding a set of enum variants
A library for creating sets of enums with a large number of variants.
An internal helper crate for big_enum_set. Not public API.
A bit-set indexed by enum variants.
Allows using a single integer column as a set of booleans, with bitfield-style storage.
Library that includes enums, and rails support for enums and bitfield sets.
enums - safe enumeration types - a set of symbolic keys bound to unique integer numbers (incl. bit flags option)
Parse and serialize PostgreSQL enum sets in Ruby, powered by Rust.
Enum machine is a library for defining enums and setting state machines for attributes in ActiveRecord models and plain Ruby classes.
Define type-safe enums in Ruby with automatic ordinals, custom values, lookup methods, and Ruby 3.x pattern matching support. A cleaner alternative to ad-hoc constants and symbol sets.
yae provides a simple enum class (enumerated type) implementation (Yae::Enum) that can be used to abstract a set of values. It also provides methods to check values existence in the enum and to iterate over its contents.
A java like Enum class for ruby. A while ago I was exploring Java, and came across the Enum class, which had some interesting functionality, and I decided that I would like something like it. Conceptually if you just need a unique identifier you may be perfectly happy using a :symbol, and that would likely be a simpler way of having a controll flag. However, if you want to have a set of unique identifiers that you can address, iterate over, assign properties to, etc, then this may be something you would be interested in.
Provides a lightweight solution for object-oriented enumerations in Ruby in a similar ways as other languages, like Java, do. It consists of a single class (Enum), that can be subclassed to create enumerated types. Each class has a set of predefined instances, that represent the enumerated values. Fatures like support for inheritance and declaring instance methods on enumerated values are supported as well.
A simple Gem to enable any `ActiveRecord::Base` object to store a set of attributes in a set like structure represented through a bitfield on the database level. You only have to specify the name of the set to hold the attributes in question an the rest is done for you through some fine selected Ruby magic. Here is a simple example of how you could use the gem: class Person < ActiveRecord::Base has_set :interests end To get this to work you need some additional work done first: 1. You need an unsigned 8-Byte integer column in your database to store the bitfield. It is expected that the column is named after the name of the set with the suffix `_bitfield` appended (e.g. `interests_bitfield`). You can change that default behavior by providing the option `:column_name` (e.g. `has_set :interests, :column_name => :my_custom_column`). 2. You need a class that provides the valid values to be stored within the set and map the single bits back to something meaningful. The class should be named after the name of the set (you can change this through the `:enum_class` option). This class could be seen as an enumeration and must implement the following simple interface: * There must be a class method `values` to return all valid enumerators in the defined enumeration. * Each enumerator must implement a `name` method to return a literal representation for identification. The literal must be of the type `String`. * Each enumerator must implement a `bitfield_index` method to return the exponent of the number 2 for calculation the position of this enumerator in the bitfield. **Attention** Changing this index afterwards will destroy your data integrity. Here is a simple example of how to implement such a enumeration type while using the the `renum` gem for simplicity. You are free to use anything else that matches the described interface. enum :Interests do attr_reader :bitfield_index Art(0) Golf(1) Sleeping(2) Drinking(3) Dating(4) Shopping(5) def init(bitfield_index) @bitfield_index = bitfield_index end end
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.