MCPcopy Index your code
hub / github.com/formatjs/formatjs / getPlugin

Function getPlugin

packages/unplugin/tests/transform.test.ts:580–582  ·  view source on GitHub ↗
(factory: Function, options: Options = {})

Source from the content-addressed store, hash-verified

578 // Helper to get the plugin object from the factory
579 // The factory signature is (options, meta) per unplugin's UnpluginFactory type
580 function getPlugin(factory: Function, options: Options = {}): any {
581 return factory(options, {framework: 'vite'})
582 }
583
584 test('unpluginFactory returns correct plugin shape', async () => {
585 const {unpluginFactory} = await import('../index.js')

Callers 1

transform.test.tsFile · 0.85

Calls 1

factoryFunction · 0.85

Tested by

no test coverage detected