Copy of https://github.com/patefacio/id/blob/master/lib/id.dart Direct copy was done, because the library didn't support Dart2.
Support for consistent use of identifiers. Identifiers are words used to create things like class names, variable names, function names, etc. Because different outputs will want different case conventions for different contexts, using the Id class allows a simple consistent input format (snake case) to be combined with the appropriate conventions (usually via templates) to produce consistent correct naming. Most ebisu entities are named (Libraries, Parts, Classes, etc).
- Given an id (all lower case string of words separated by '_')...
- Id-like object with special overrides for snake, emacs, camel, capCamel and capSnake which end in unserscore (or hyphen for emacs). The purpose is to support special terms that conflict with keywords in target languages (e.g. String -> String_)
- Supports the same interface as Id but all transformations like camel, snake, ... resolve to no-ops. [...]
String s) → dynamic
Given a camel case word
swith all cap abbreviations embedded, converts the abbreviations to camel. [...]
dynamic id) → Id
Creates an Id when passed
String, returns the Id when passed an Id
String text) → Id
- Create an Id from text [...]
String words) → Id
- Create an Id from a sentence like string of white-space delimited words [...]
String id) → Id
- Create a new IdTrailingUnderscore