npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@office-ai/platform

v0.3.16

Published

## http 请求功能模块

Readme

office-ai 插件与 AI 面板通用 sdk

http 请求功能模块

buildHttpCtrl 构造标准的请求工具

  import {http} from '@office-ai/platform'
  const {get, post ,del ,getCreator,postCreator,delCreator} = http.buildHttpCtrl('server-url')

buildRxHttpCtrl 构造基于 rx 请求工具

   import {http} from '@office-ai/platform'
  const {rxGet, rxPost ,rxDel ,rxGetCreator,rxPostCreator,rxDelCreator} = http.buildHttpCtrl('server-url')

storage 缓存能力处理

  import {storage,get,interceptor} from '@office-ai/platform'
  const customStorage = storage.buildStorage('name');//构建一个自定义缓存器
  get(key:string):Promise<any>; 获取缓存
  set(key:string,data:any):Promise<any>; 设置缓存
  remove(key:string):Promise<any>;移除某一项的缓存
  clear():Promise();清除缓存
  interceptor({setter,getter,remover,cleaner}):void; 设置缓存策略,默认使用的是Localstroage

system 信息信息注入

  import { system } from '@office-ai/platform'
  system.config(provider?(config):Promise<config>);// 设置或者获取缓存

bridge 事件桥

  import {bridge} from '@office-ai/platform';
  bridge.on(eventName,handler);监听一个事件(其它窗口触发);
  bridge.emit(eventName,data);触发一个事件(其它窗口响应);
  bridge.subscribe(eventName,handler);注册一个方法,并返回执行结果(其它窗口触发);
 const data = await  bridget.invoke(eventName,data);执行一个方法,并接收返回值

2025/04/[email protected] 增加主程平台信息标识 2025/05/[email protected] 增加主题配置内容 2025/05/[email protected] 增加 bridge 全局拦截器 2025/05/[email protected] 修改由于 0.1.18 功能引入的问题 2025/05/[email protected] 增加 logger 日志 2025/05/[email protected] 修改 storage 机制 2025/05/[email protected] 系统配置增加 home_path 2025/05/[email protected] 弹窗增加初始数据及获取弹窗数据能力 2025/05/[email protected] 日志增加性能数据统计