Closed npeterkamps closed 2 years ago
@npeterkamps Looks good, just need to fix formatting. Running yarn format
should probably do it.
Ran yarn format
and committed only the changes related to code that I touched.
@milesj Do you have some time to give this another look and approve running the workflows?
@npeterkamps Thanks! Will publish shortly.
Implementation for my feature request: #139
cdnUrl
is a new property of theoptions
object and can be astring
or a function(path: string, version: string): string
.When
cdnUrl
is astring
, it's appended with/${path}
. Since the default URL usesemojibase-data@latest
for version, I didn't feel comfortable making assumptions about the placement of theversion
string. So I opted for not inserting theversion
anywhere, instead relying on theversion
already being inside the configuredcdnUrl
.When
cdnUrl
is afunction
, it receives bothpath
andversion
, although I suspect theversion
parameter will generally be unused - might as well hard-code it within the function body, right?Updated the docs to reflect the above and added tests to reflect these new capabilities.