OS.js is an open-source desktop implementation for your browser with a fully-fledged window manager, Application APIs, GUI toolkits and filesystem abstraction.
This is the Example Service Provdider for OS.js v3
In you startup procedure, simply import and register:
import {ExampleServiceProvider} from '@osjs/example-provider'; // You want your package name here
// ...
osjs.register(ExampleServiceProvider)
// ...
Then you can use core.make('example/instance')
or core.make('example/singleton')
(as provided by this example).