# ez-plugin

> A NodeJS module for easy plugin support.

Latest version **1.0.0** (published 2017-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install ez-plugin
pnpm add ez-plugin
yarn add ez-plugin
bun add ez-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-02-28 |
| First published | 2016-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | FreehuntX |
| Maintainers | freehuntx |
| Keywords | plugins, plugin |

## Links

- npm: https://www.npmjs.com/package/ez-plugin
- Repository: https://github.com/freehuntx/ez-plugin
- Homepage: https://github.com/freehuntx/ez-plugin#readme
- Issues: https://github.com/freehuntx/ez-plugin/issues
- npm.io page: https://npm.io/package/ez-plugin

## Dependencies (1)

- [glob](https://npm.io/package/glob.md) 7.0.x

## Recent versions

- 1.0.0 (latest) — 2017-02-28
- 0.1.0 — 2016-09-15
- 0.0.1 — 2016-08-11

## README

### EzPlugin
A NodeJS module for easy simple plugin support.

#### Example
main.js
```
const EzPlugin = require('ez-plugin');

let ezPlugin = new EzPlugin();
ezPlugin.loadPlugins(__dirname+'/plugins');

let messageData = {msg: "Guten Tag!"};

ezPlugin.call('message', messageData);
console.log(messageData.msg);
```

plugins/message-changer.js
```
module.exports = {
  name: 'MessageChanger',
  version: '0.0.1',
  priority: 20,
  active: true,

  load: function() {
    console.log(`Plugin ${this.name} (${this.version}) loaded`);
  },
  unload: function() {
  },

  message: function(messageData) {
    messageData.msg += "(Changed)";
  }
};
```

---
_Source: https://npm.io/package/ez-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
