Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

posthog-js-lite

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

posthog-js-lite - npm Package Compare versions

Comparing version 0.0.5 to 2.0.0-alpha1

index.ts

47

package.json
{
"name": "posthog-js-lite",
"version": "0.0.5",
"description": "Reimplementation of posthog-js to be as light and modular as possible.",
"main": "dist/src/index.js",
"scripts": {
"build": "tsc -p .",
"test": "jest",
"prepublish": "yarn test && yarn build"
},
"author": "PostHog",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@types/jest": "^26.0.3",
"husky": ">=4",
"lint-staged": ">=10",
"@types/node": "^14.0.19",
"prettier": "^2.0.5",
"eslint": "^7.4.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"babel-jest": "^26.1.0",
"jest": "^26.1.0",
"ts-jest": "^26.1.1",
"ts-node": "^8.10.2",
"typescript": "^3.9.6"
},
"jest": {
"testPathIgnorePatterns": [
"<rootDir>/dist/"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,js,css,scss}": "prettier --write"
}
"name": "posthog-js-lite",
"version": "2.0.0-alpha1",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts"
}

@@ -1,25 +0,3 @@

[![NPM Version](https://img.shields.io/npm/v/posthog-js-lite.svg)](https://www.npmjs.com/package/posthog-js-lite)
[![minified](https://badgen.net/bundlephobia/min/posthog-js-lite)](https://bundlephobia.com/result?p=posthog-js-lite)
[![minified + gzipped](https://badgen.net/bundlephobia/minzip/posthog-js-lite)](https://bundlephobia.com/result?p=posthog-js-lite)
# PostHog Web
**This library is still a work in progress!**
Reimplementation of posthog-js to be as light and modular as possible.
Goals:
- simple api
- can do autocapture, but enabled via a plugin (not yet)
- runs in the oldest browsers (not yet)
- might break some APIs (if not now, then when?)
Supports already:
- very simple api
- capture & identify calls
- $context from window
- only send events after optin if needed
- payload compression
- 10kb (includes 5kb compression code)
Browser support:
- This library ES6 compatible browsers (everything except IE). If you need to support IE,
feel free to transpile the source to ES5 after including it in your bundle.
> 🚧 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)
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"allowJs": true,
"target": "es6",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./src",
"incremental": true,
"types": ["jest", "node"],
"strict": true
},
"exclude": ["node_modules", "dist"]
"extends": "../tsconfig.json",
"compilerOptions": {
"lib": ["DOM"]
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc