@braze/web-sdk-core

中文文档
3.5.1发布于 2022/03/25SEE LICENSE IN https://github.com/Appboy/appboy-web-sdk/blob/master/LICENSECommonJS零依赖近 30 天下载 6884

Core Braze SDK (no UI) for web sites and other JS platforms.

原始使用文档

Install

$ npm install --save @braze/web-sdk-core

This will install the Braze Web SDK files into ./node_modules/@braze/web-sdk-core where you can reference them locally. Note that the Braze Web SDK is meant to be used client-side in a web application and may not work as expected in a Node.js server environment.

Usage

Note that this core version of the SDK does not contain any of Braze's built-in UI capabilities (any appboy.display methods). You will need to implement your own UI for In-App Messaging and Content Cards. Note that our UI elements are fully customizable via css, so we generally recommend integration of the complete library instead.

var appboy = require('@braze/web-sdk-core');
appboy.initialize('YOUR-API-KEY', { baseUrl: 'YOUR-SDK-ENDPOINT' });
appboy.openSession();

See the Public Github Repo for getting started instructions or our documentation pages for use-case based documentation.

版本与发布记录

@braze/web-sdk-core 共发布 14 个版本,首次发布于 2020/06/09;过去 12 个月发布了 0 个版本。

版本发布日期距今
3.5.1latest2022/03/254 年前
3.5.02022/02/034 年前
3.4.12021/10/085 年前
3.4.02021/09/255 年前
3.3.02021/05/255 年前
3.2.02021/02/265 年前

关于 @braze/web-sdk-core 的常见问题

@braze/web-sdk-core 是什么?

Core Braze SDK (no UI) for web sites and other JS platforms.

如何安装 @braze/web-sdk-core?

在项目目录运行 npm install @braze/web-sdk-core,或使用 pnpm add / yarn add / bun add。

@braze/web-sdk-core 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/braze__web-sdk-core 是否存在。

@braze/web-sdk-core 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@braze/web-sdk-core 可以商用吗?

@braze/web-sdk-core 使用 SEE LICENSE IN https://github.com/Appboy/appboy-web-sdk/blob/master/LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@braze/web-sdk-core 的下载量有多少?

根据 npm 官方下载统计,@braze/web-sdk-core 在 2026/10/09 – 2026/11/07 这 30 天内被下载 6,884 次,日均约 229 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@braze/web-sdk-core 还在维护吗?

最新版本 3.5.1 发布于 2022/03/25(4 年前);至今共发布 14 个版本,其中过去 12 个月发布了 0 个;首次发布于 2020/06/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。