unit top-level property
Implementation
final Parser<String> unit = (pluralDateTimePrecision |
dateTimePrecision |
STRING
.where((value) {
return UcumService().validate(value.value) == null;
})
.trim()
.map((value) => value.value))
.flatten()
.map((value) {
if (value.startsWith("'")) {
value = value.substring(1, value.length - 1);
}
if (value.endsWith("'")) {
value = value.substring(0, value.length - 1);
}
return value;
});