Package Exports
- @conectate/ct-helpers
- @conectate/ct-helpers/ct-helpers.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@conectate/ct-helpers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ct-helpers
It's a simple wrapper for LitElement
Installation
To include this, type:
$ pnpm i @conectate/ct-helpers
or
$ npm i @conectate/ct-helpers
Usage
// Typescript
import { PushID, browserCapabilities, getClient, getGeoLocation, sleep } from "@conectate/ct-helpers";
let ua = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36";
async function main() {
console.log(browserCapabilities(ua));
// Set(4) { 'es2015', 'es2016', 'es2017', 'push' }
console.log(getClient(ua));
// {
// browser: 'edge',
// browserVersion: 44.18363,
// isMobile: false,
// os: 'windows',
// osVersion: 10
// }
console.log(await getGeoLocation());
await sleep(1000);
let pid = new PushID();
let randomID_20length: string = pid.next(20);
}
main();
Follow me
https://dev.to/herberthobregon
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
License
See LICENSE