You can use the indexOf function to find the first occurrence of a period (.) in the string, and then use the substr function to extract the substring from the beginning of the original string up to (but not including) the period.
index.ts128 chars5 lines
Alternatively, you can use the substring function instead of substr.
index.ts131 chars5 lines
gistlibby LogSnag