Common snippets across scripted dashboards

Is there a way to keep common “helper” snippets in a single .js file (legends, computations, etc.) and import them in a scripted dashboard?