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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@finovision/i18n-resource

v1.0.0

Published

i18n resource adapter with Coze-style flat keys and TypeScript definitions (studio-i18n-resource)

Downloads

24

Readme

@finovision/i18n-resource

参照 Coze studio-i18n-resource资源适配包。文案在 src/locales/*.json,由 config.ts 静态 import,构建时打进主包,浏览器 / Node 用法一致。

使用

import { buildDefaultConfig, defaultConfig, Locale } from '@finovision/i18n-resource';
import i18n from 'i18next';

// 按语言 ID 筛选(JSON 已在包内,无需 await、无需再 import JSON)
const resources = buildDefaultConfig([Locale.En, Locale.ZhCN]);
// 或全部语言:defaultConfig

await i18n.init({
  resources,
  lng: Locale.En,
  defaultNS: 'i18n',
  keySeparator: false,
});

await i18n.changeLanguage(Locale.ZhCN);

Vue 3 + vue-i18n

import { createI18n } from 'vue-i18n';
import { buildDefaultConfig, Locale } from '@finovision/i18n-resource';

const resources = buildDefaultConfig([Locale.En, Locale.ZhCN]);

export const i18n = createI18n({
  legacy: false,
  locale: Locale.En,
  messages: {
    en: resources.en!.i18n,
    'zh-CN': resources['zh-CN']!.i18n,
  },
});

手动传入 JSON(可选,覆盖部分语言)

import { assembleI18nResources } from '@finovision/i18n-resource';
import customEn from './my-en.json';

const resources = assembleI18nResources({ en: customEn });

安装

npm install @finovision/i18n-resource
# 本地联调
npm install file:../fv-i18n-resource

新增语言

  1. 添加 src/locales/ja.json
  2. npm run dl-i18n(更新 Locale 枚举、config.ts 内 import 区块)
  3. npm run build

脚本

| 命令 | 说明 | |------|------| | npm run dl-i18n | 生成类型、locale-meta.tsconfig.ts 内联 import | | npm run build | Rollup 打包(含 JSON) | | npm test | 构建并测试 |

License

MIT