A typed library for common and utility tasks.
npm install @rr0/common --save
UserPreferences defines a type which requires a locale property.
KeyValue<T> defines a type whole all fields are of type T.
ObjectUtils.isUndefined(val)checks ifvalis strictlyundefined.ObjectUtils.isDefined(val)checks ifvalis strictly anything butundefined.ObjectUtils.isUnset(val)checks ifvalis strictlyundefinedornull.ObjectUtils.isSet(val)checks ifvalis strictly anything butundefinednornull.ObjectUtils.asSet(val, errMsg?)returns val as defined. If it was not, an AssertionError(errMsg) will be thrown.
StringUtils.toString(val)returns a string representation ofval, enclosed in quotes ifvalis astring.
Gender is an enumeration to qualify things' gender.