UNPKG

strapi-plugin-io

Version:

A plugin for Strapi CMS that provides the ability for Socket IO integration

18 lines (12 loc) 303 B
'use strict'; const { pluginId } = require('./pluginId'); function getService({ name, plugin = pluginId, type = 'plugin' }) { let serviceUID = `${type}::${plugin}`; if (name && name.length) { serviceUID += `.${name}`; } return strapi.service(serviceUID); } module.exports = { getService, };