importing Modules
The import statement can be used to import dependencies that contain certain functionality you want to use within your policy. Dependencies are specified via the spec.dependencies option. JsPolicy will bundle all dependencies including the policy payload into a single minified bundle that is saved as JsPolicyBundle with the same name as the JsPolicy in the cluster.
:::hint
You can also import packages from private npm registries by overwriting the ~/.npmrc
:::
Example#
This example shows how to import loadash into a JsPolicy.