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

@lazy-random/seed-data

v2.0.1

Published

匯出亂數種子 (Random Seed) 相關的來源資料 (Source Data),供其他套件產生種子或記錄除錯資訊時引用

Readme

@lazy-random/seed-data

@lazy-random/seed-data 匯出與亂數種子 (Random Seed) 相關的來源資料 (Source Data),目前提供 random-extra 套件的名稱與版本資訊,供其他套件在產生種子或記錄除錯資訊時引用,避免各處硬編碼 (Hardcode) 同一份資料。

特色 (Features)

  • 以 Object.freeze() 凍結 (Freeze) 資料,避免執行期被意外修改
  • 同時提供整份資料與拆解後的 name、version 兩種取用方式
  • 零相依 (Zero Dependency)、無副作用 (Side-effect Free)
  • 同時輸出 CommonJS 與 ESM 產物,並附帶 TypeScript 型別宣告檔 (Type Declarations)

安裝 (Installation)

pnpm add @lazy-random/seed-data
npm install @lazy-random/seed-data
yarn add @lazy-random/seed-data
yarn-tool add @lazy-random/seed-data
yt add @lazy-random/seed-data

使用方式 (Usage)

import randomSeedStrData, { name, version } from '@lazy-random/seed-data';

console.log(randomSeedStrData);
// { name: 'random-extra', version: '3.6.15' }

console.log(name);    // 'random-extra'
console.log(version); // '3.6.15'

API 文件 (API Reference)

randomSeedStrData

凍結的來源資料物件 (Frozen Source Data Object),預設匯出 (Default Export)。

| 欄位 (Field) | 型別 (Type) | 說明 (Description) | | --- | --- | --- | | name | string | 來源套件名稱,目前為 random-extra | | version | string | 來源套件版本,目前為 3.6.15 |

物件透過 Object.freeze() 凍結,於嚴格模式 (Strict Mode) 下試圖寫入會拋出 TypeError;除預設匯出外,亦提供同名的具名匯出 (Named Export),可與 name、version 一併以具名方式引入。

name

randomSeedStrData.name 的別名 (Alias),值為 'random-extra'。

version

randomSeedStrData.version 的別名 (Alias),值為 '3.6.15'。

設定 (Configuration)

本套件不需要任何設定,匯入後即可直接使用。

開發 (Development)

pnpm run build
pnpm run test:jest
pnpm run lint

變更日誌 (Changelog)

本套件的版本變更請見 CHANGELOG.md。

常見問題 (FAQ)

name / version 和本套件的套件名稱有什麼不同?

name / version 描述的是資料來源([email protected]),不是 @lazy-random/seed-data 自身的套件名稱與版本。要取得本套件自身的版本,請讀取 package.json。

可以修改匯出的資料嗎?

不行。randomSeedStrData 已透過 Object.freeze() 凍結,且 name、version 是建立時就取好的常數,修改物件不會影響它們。

相關資源 (Resources)