-
Notifications
You must be signed in to change notification settings - Fork 115
Library Dependencies
Last Updated: 12/11/2016
These are the modules we depend on, with their corresponding minified or unminified sizes:
| Library | Link | Minified Size | Purpose | Should Remove? |
| ------------- |:-------------:| -----:|
| EventEmitter | Link | 2.91 KB | Provides OneSignal.on
and OneSignal.once
event listener methods. | Yes, we should switch this out to es6-emitter so we don't have to use heir below maybe. |
| Heir | Link | < 3.62 KB (unminified) | Our classes have to inherit the event emitter class in order to use .on()
and .once()
. Maybe this would go away if we switched to es6-emitter? | Yes |
| loglevel | Link | 2.34 KB | Separates logging by levels. | No, works well, super small. |
| js-cookie | Link | 3.59 KB | Simplifies cookie management with Cookie.get()
and Cookie.set()
. | No, probably not, not too big. |
| bowser | Link | 6.46 KB | Browser detection. Use like bowser.chrome == true
or bowser.samsungBrowser
. | Yes, this could all be replaced with a very simple regex detection like we had originally. |
| object-assign | Link | 2.01 KB | Ponyfill for Object.assign()
, which is not implemented in all browser. | Yes, this is basically a utility function we could just call instead. No need for ponyfill detection. |
| swivel | Link | 4.06 KB | Allows message passing between Service Worker and host page. | No, not yet, although this library had to be patched a bit, for now it still works, maybe we can replace it later. |
| es6-error | Link | 2.64 KB | Allows inheriting from the Error object correctly. | No, works, is small. |
| Validator/isUuid | Link | 0.88 KB | Checks if something is a valid UUID. | No, works well, very small. |
Total: 28.51 KB (minified + non-minified, so not quite summable)