Socket
Socket
Sign inDemoInstall

@splitbee/core

Package Overview
Dependencies
0
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.7 to 0.3.0

12

dist/api.d.ts

@@ -27,5 +27,9 @@ export declare type Device = {

}
export declare type JSONType = {
[key: string]: string | number;
export declare type EventData = {
[key: string]: string | number | boolean | undefined;
};
/**
* @deprecated Use EventData instead.
*/
export declare type JSONType = EventData;
interface PageViewRequest extends GenericRequest {

@@ -49,3 +53,3 @@ path: '/i';

event: string;
data?: JSONType;
data?: EventData;
options?: EventOptions;

@@ -56,3 +60,3 @@ };

path: '/user';
body: JSONType;
body: EventData;
}

@@ -59,0 +63,0 @@ interface EndRequest extends GenericRequest {

@@ -1,6 +0,6 @@

import { RequestContext, JSONType, EventOptions, setEndpoint, Response } from './api';
import { RequestContext, JSONType, EventData, EventOptions, setEndpoint, Response } from './api';
export declare const analytics: {
track: ({ event, data, context, options, }: {
event: string;
data?: JSONType | undefined;
data?: EventData | undefined;
context: RequestContext;

@@ -19,3 +19,3 @@ options?: EventOptions | undefined;

identify: ({ userData, context, }: {
userData: JSONType;
userData: EventData;
context: RequestContext;

@@ -32,2 +32,2 @@ }) => Promise<Response | undefined>;

};
export { RequestContext, JSONType, Response, setEndpoint };
export { RequestContext, EventOptions, JSONType, EventData, Response, setEndpoint, };
{
"name": "@splitbee/core",
"version": "0.2.7",
"version": "0.3.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,27 +0,8 @@

# TSDX Bootstrap
# @splitbee-core
This project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx).
This package includes the basic communication layer with the internal [Splitbee](https://splitbee.com) API + typings.
## Local Development
## Related packages
Below is a list of commands you will probably find useful.
### `npm start` or `yarn start`
Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.
<img src="https://user-images.githubusercontent.com/4060187/52168303-574d3a00-26f6-11e9-9f3b-71dbec9ebfcb.gif" width="600" />
Your library will be rebuilt if you make edits.
### `npm run build` or `yarn build`
Bundles the package to the `dist` folder.
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
<img src="https://user-images.githubusercontent.com/4060187/52168322-a98e5b00-26f6-11e9-8cf6-222d716b75ef.gif" width="600" />
### `npm test` or `yarn test`
Runs the test watcher (Jest) in an interactive mode.
By default, runs tests related to files changed since the last commit.
- [@splitbee/web](https://splitbee.io/docs/javascript-library) - For front-end JavaScript applications
- [@splitbee/node](https://splitbee.io/docs/backend-analytics-nodejs) - For back-end use with Node.js

@@ -28,4 +28,11 @@ export type Device = {

export type JSONType = { [key: string]: string | number };
export type EventData = {
[key: string]: string | number | boolean | undefined;
};
/**
* @deprecated Use EventData instead.
*/
export type JSONType = EventData;
interface PageViewRequest extends GenericRequest {

@@ -50,3 +57,3 @@ path: '/i';

event: string;
data?: JSONType;
data?: EventData;
options?: EventOptions;

@@ -58,3 +65,3 @@ };

path: '/user';
body: JSONType;
body: EventData;
}

@@ -61,0 +68,0 @@

@@ -5,2 +5,3 @@ import {

JSONType,
EventData,
EventOptions,

@@ -19,3 +20,3 @@ setEndpoint,

event: string;
data?: JSONType;
data?: EventData;
context: RequestContext;

@@ -58,3 +59,3 @@ options?: EventOptions;

}: {
userData: JSONType;
userData: EventData;
context: RequestContext;

@@ -92,2 +93,9 @@ }) => {

export { RequestContext, JSONType, Response, setEndpoint };
export {
RequestContext,
EventOptions,
JSONType,
EventData,
Response,
setEndpoint,
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc