# Create

If you want to create a Plugin to publish on NPM, copy the code below and put the source in the exported method.

{% hint style="info" %}
Write your plugins in Commonjs to allow either Commonjs or ESM support!
{% endhint %}

{% code overflow="wrap" lineNumbers="true" %}

```javascript
module.exports = (database, record) => {
// database & record can be null, depending on how the user calls the plugin. Be sure to be able to handle that!
// Plugin source here
}
```

{% endcode %}
