0.0.28 • Published 9 months ago

@grnsft/if-core v0.0.28

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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

9 months ago

0.0.28

9 months ago

0.0.26

9 months ago

0.0.24

9 months ago

0.0.25

9 months ago

0.0.23

10 months ago

0.0.22

10 months ago

0.0.21

10 months ago

0.0.20

11 months ago

0.0.19

11 months ago

0.0.18

11 months ago

0.0.17

11 months ago

0.0.16

12 months ago

0.0.15

12 months ago

0.0.14

12 months ago

0.0.13

12 months ago

0.0.12

12 months ago

0.0.11

12 months 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