Libraries
Import any custom library to your Coast demo via the Libraries Tab, under Config. Coast includes several packages by default (like lodash, moment.js), but you can use this feature to add any external library, loaded and available on each new demo load.
If you're looking for a hosted npm package, you can use https://cdnjs.com/, https://unpkg.com/, or https://www.jsdelivr.com/.
Example
Let's say we wish to install the voca package into our Coast demo, for easy-to-use string manipulation functions.
- We can start by importing the package via the Libraries tab, by using its web-bundled package URL: https://cdn.jsdelivr.net/npm/voca@1.4.1/index.min.js

- Now that we have the package installed, we can make use of all the functions that come with the voca package, wherever we execute JavaScript. As per the package documentation, we can now access these string manipulations, via the
v
, global variable.
Here is a quick example of how we could use this newly imported package to slugify a string.
