
Security News
Frontier AI Is Now Critical Infrastructure
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.
@appthen/utils
Advanced tools
一个独立的工具函数库,从 appthen-react/src/utils 迁移而来,便于多项目复用。
pnpm add @appthen/utils
setItem - 设置存储项getItem - 获取存储项removeItem - 删除存储项getItemSync - 同步获取存储项$storage - 存储工具对象preload / $preload - 全局数据预加载dayjs - dayjs 实例moment / $moment - dayjs 别名dataSource - 低代码数据源引擎ENV_TYPE - 环境类型常量getEnv - 获取当前环境navigateTo - 页面跳转request - 网络请求import { preload, setItem, getItem, dayjs } from '@appthen/utils';
// 数据预加载
preload('userInfo', { name: 'John', age: 30 });
const userInfo = preload('userInfo');
// 存储操作
await setItem('token', 'abc123');
const token = await getItem('token');
// 时间处理
const now = dayjs().format('YYYY-MM-DD');
本包使用 peerDependencies 模式,需要在主项目中安装以下依赖:
@tarojs/taro - Taro 框架(或使用 @appthen/tarojs 模拟包)react - React 框架axios - HTTP 客户端dayjs - 时间处理库pnpm run build
详细的迁移过程和问题解决记录请参考 迁移与构建问题记录.md。
FAQs
一个独立的工具函数库,从 `appthen-react/src/utils` 迁移而来,便于多项目复用。
The npm package @appthen/utils receives a total of 1 weekly downloads. As such, @appthen/utils popularity was classified as not popular.
We found that @appthen/utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.