0.0.28 • Published 11 months ago
@grnsft/if-core v0.0.28
if-core
Here you can find all the necessary utilities for plugin development.
- Plugin Factory
- Utils for advanced plugin development
- Types
Installing
Run the command below in your project root:
npm install @grnsft/if-core
Usage
Note: For proper error handling, you have to use error classes from
@grnsft/if-core/utils
.
Here you can see usage example for plugin development:
import {PluginFactory} from '@grnsft/if-core/interfaces';
import {ERRORS} from '@grnsft/if-core/utils';
import {PluginParams, CustomConfig} from '@grnsft/if-core/types';
const {ConfigError, MissingInputDataError} = ERRORS;
const CustomPlugin = PluginFactory<CustomConfig>({
configValidation: (config: CustomConfig) => {
if (!config) {
throw new ConfigError('My message here');
}
return config
},
implementation: async (inputs: PluginParams[], config: ConfigParams) => {
// plugin related stuff here
}
})
0.0.27
11 months ago
0.0.28
11 months ago
0.0.26
11 months ago
0.0.24
12 months ago
0.0.25
12 months ago
0.0.23
1 year ago
0.0.22
1 year ago
0.0.21
1 year ago
0.0.20
1 year ago
0.0.19
1 year ago
0.0.18
1 year ago
0.0.17
1 year ago
0.0.16
1 year ago
0.0.15
1 year ago
0.0.14
1 year ago
0.0.13
1 year ago
0.0.12
1 year ago
0.0.11
1 year ago
0.0.10
1 year ago
0.0.9
1 year ago
0.0.8
1 year ago
0.0.7
1 year ago
0.0.6
1 year ago
0.0.5
1 year ago
0.0.4
1 year ago
0.0.3
1 year ago
0.0.2
1 year ago