qipp-services-utils
General
This module provides five factories as utilities: analytics, cssProperties, deepExtend, getScript, windowLocation.
Install
npm i qipp-services-utils
Angular usage
analytics
The analytics() factory is a wrapper around the Google Analytics $window objet:
See Google Analytics documentation for further help.
cssProperties
This factory returns the corresponding vendor css properties for transitionDuration, transitionEnd and transform of a given element:
/*Object { transitionDuration: "transitionDuration", transitionEnd: "transitionend", transform: "transform"}*/
deepExtend
This service provides a method to deep extend objects or array, like the jQuery extend method with the deep option:
var extvar obj = propA: 123 propB: 456ext = console // { propA: 123, propB: 456, propC: 789 }
getScript
This factory provides a method is a promise with .success and .error callbacks to dynamically append a given script to the DOM and load it:
windowLocation
This factory is a wrapper around $window.location:
// https://app.qipp.com
Tools
Linting with StandardJS
Please refer to the JavaScript Standard Style for general rules.
npm run lint
Unit testing with Karma
npm test
Requirements
Angular
- angular 1.4.3
Google Analytics
Licence
Released under the MIT license by qipp.