posthog-js-lite 0.0.5 → 2.0.0-alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -24
- package/index.ts +5 -0
- package/lib/index.cjs.js +1471 -0
- package/lib/index.cjs.js.map +1 -0
- package/lib/index.d.ts +177 -0
- package/lib/index.esm.js +1466 -0
- package/lib/index.esm.js.map +1 -0
- package/lib/node_modules/tslib/tslib.es6.d.ts +35 -0
- package/lib/posthog-core/src/eventemitter.d.ts +8 -0
- package/lib/posthog-core/src/index.d.ts +84 -0
- package/lib/posthog-core/src/lz-string.d.ts +8 -0
- package/lib/posthog-core/src/types.d.ts +68 -0
- package/lib/posthog-core/src/utils.d.ts +13 -0
- package/lib/posthog-web/index.d.ts +3 -0
- package/lib/posthog-web/src/context.d.ts +1 -0
- package/lib/posthog-web/src/posthog-web.d.ts +18 -0
- package/lib/posthog-web/src/storage.d.ts +12 -0
- package/package.json +9 -42
- package/src/context.ts +168 -0
- package/src/posthog-web.ts +70 -0
- package/src/storage.ts +114 -0
- package/test/posthog-web.spec.ts +32 -0
- package/tsconfig.json +4 -17
- package/.prettierrc +0 -7
- package/babel.config.js +0 -4
- package/dist/babel.config.d.ts +0 -5
- package/dist/babel.config.js +0 -5
- package/dist/babel.config.js.map +0 -1
- package/dist/package.json +0 -44
- package/dist/src/__tests__/index.d.ts +0 -1
- package/dist/src/__tests__/index.js +0 -48
- package/dist/src/__tests__/index.js.map +0 -1
- package/dist/src/index.d.ts +0 -19
- package/dist/src/index.js +0 -109
- package/dist/src/index.js.map +0 -1
- package/dist/src/targets/browser.d.ts +0 -19
- package/dist/src/targets/browser.js +0 -10
- package/dist/src/targets/browser.js.map +0 -1
- package/dist/src/targets/node.d.ts +0 -19
- package/dist/src/targets/node.js +0 -9
- package/dist/src/targets/node.js.map +0 -1
- package/dist/src/types.d.ts +0 -20
- package/dist/src/types.js +0 -3
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils/context.d.ts +0 -1
- package/dist/src/utils/context.js +0 -187
- package/dist/src/utils/context.js.map +0 -1
- package/dist/src/utils/lz-string.d.ts +0 -14
- package/dist/src/utils/lz-string.js +0 -467
- package/dist/src/utils/lz-string.js.map +0 -1
- package/dist/src/utils/utils.d.ts +0 -3
- package/dist/src/utils/utils.js +0 -29
- package/dist/src/utils/utils.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -2454
- package/src/__tests__/index.js +0 -47
- package/src/index.ts +0 -127
- package/src/targets/browser.ts +0 -17
- package/src/targets/node.ts +0 -6
- package/src/types.ts +0 -22
- package/src/utils/context.ts +0 -163
- package/src/utils/lz-string.js +0 -511
- package/src/utils/utils.ts +0 -28
package/README.md
CHANGED
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
[](https://bundlephobia.com/result?p=posthog-js-lite)
|
|
3
|
-
[](https://bundlephobia.com/result?p=posthog-js-lite)
|
|
1
|
+
# PostHog Web
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Reimplementation of posthog-js to be as light and modular as possible.
|
|
8
|
-
|
|
9
|
-
Goals:
|
|
10
|
-
- simple api
|
|
11
|
-
- can do autocapture, but enabled via a plugin (not yet)
|
|
12
|
-
- runs in the oldest browsers (not yet)
|
|
13
|
-
- might break some APIs (if not now, then when?)
|
|
14
|
-
|
|
15
|
-
Supports already:
|
|
16
|
-
- very simple api
|
|
17
|
-
- capture & identify calls
|
|
18
|
-
- $context from window
|
|
19
|
-
- only send events after optin if needed
|
|
20
|
-
- payload compression
|
|
21
|
-
- 10kb (includes 5kb compression code)
|
|
22
|
-
|
|
23
|
-
Browser support:
|
|
24
|
-
- This library ES6 compatible browsers (everything except IE). If you need to support IE,
|
|
25
|
-
feel free to transpile the source to ES5 after including it in your bundle.
|
|
3
|
+
> 🚧 This is a WIP. Currently the only officially supported way of using PostHog on the web is [posthog-js](https://github.com/PostHog/posthog-js)
|