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

apemanlocale

v6.0.2

Published

Message resource for apeman project.

Readme

apemanlocale

Build Status npm Version JS Standard

Message resource for apeman project.

Installation

$ npm install apemanlocale --save

Usage

Create a directory with name "loc" and put locale files like "en.json" there.

loc/en.json

{
  "keys": {
    "APP_NAME": "hello-world"
  },
  "titles": {
    "WELCOME_TITLE": "Welcome to #{keys.APP_NAME}!"
  }
}

loc/index.js

'use strict'

const apemanlocale = require('apemanlocale')

// Exports locales as module.
let locales = apemanlocale(__dirname, {
  // Options
})

// Print all locales
locales.print()

module.exports = locales

Then,

'use strict'

// Require defined locales
const loc = require('./loc/index.js')

let en = loc('en')
console.log(en.titles.WELCOME_TITLE) // -> "Welcome to hello-world!"

Signature

apemanlocale(dirname, options) -> object

Define locale message resource.

Args

| Name | Type | Default | Description | | --- | ---- | --- | --- | | dirname | string | locales | Directory path which contains locale messages. | | options | object | | Optional settings. | | options.default | object | en | Default lang. | | options.fallback | boolean | | Use default lang as fallback | | options.buildin | boolean | | Use buildin langs |

Build-in messages

| Key | Message | | --- | ------- | | errors.RESOURCE_DATA_CONFLICT_ERROR | RESOURCE_DATA_CONFLICT_ERRORリソースデータ競合エラー | | errors.RESOURCE_DATA_ERROR | RESOURCE_DATA_ERRORリソースデータエラー | | errors.RESOURCE_DATA_MISSING_ERROR | RESOURCE_DATA_MISSING_ERRORリソースデータ欠落エラー | | errors.RESOURCE_ERROR | RESOURCE_ERRORリソースエラー | | errors.RESOURCE_INCLUDE_ERROR | RESOURCE_INCLUDE_ERRORリソースインクルードエラー | | errors.RESOURCE_INCLUDE_INVALID_ERROR | RESOURCE_INCLUDE_INVALID_ERRORRESOURCE_INCLUDE_INVALID_ERROR | | errors.RESOURCE_NOT_FOUND_ERROR | RESOURCE_NOT_FOUND_ERROR未検出エラー | | errors.RESOURCE_TYPE_ERROR | RESOURCE_TYPE_ERRORリソース種別エラー | | errors.RESOURCE_TYPE_INVALID_ERROR | RESOURCE_TYPE_INVALID_ERRORリソース種別不正エラー | | errors.RESOURCE_TYPE_MISSING_ERROR | RESOURCE_TYPE_MISSING_ERRORリソース種別欠落エラー | | errors.RESOURCE_VR_ERROR | RESOURCE_VR_ERRORリソースバージョンエラー | | errors.RESOURCE_VR_TYPE_ERROR | RESOURCE_VR_TYPE_ERRORリソースバージョン種別エラー | | errors.SIGN_CAPTCHA_WRONG_ERROR | SIGN_CAPTCHA_WRONG_ERRORCAPTCHA照合エラー | | errors.SIGN_ERROR | SIGN_ERRORログインエラー | | errors.SIGN_FORM_WRONG_ERROR | SIGN_FORM_WRONG_ERRORログイン入力内容エラー | | errors.SOMETHING_WRONG_ERROR | SOMETHING_WRONG_ERROR不明なエラー | | errors.VALUE_DUPLICATE_ERROR | VALUE_DUPLICATE_ERROR文字列重複エラー | | errors.VALUE_ERROR | VALUE_ERROR値エラー | | errors.VALUE_INVALID_ERROR | VALUE_INVALID_ERROR値不正エラー | | errors.VALUE_MISSING_ERROR | VALUE_MISSING_ERROR値欠落エラー | | errors.VALUE_NUMBER_ERROR | VALUE_NUMBER_ERROR数値エラー | | errors.VALUE_NUMBER_INVALID_ERROR | VALUE_NUMBER_INVALID_ERROR数値不正エラー | | errors.VALUE_NUMBER_TOO_LARGE_ERROR | VALUE_NUMBER_TOO_LARGE_ERROR数値上限エラー | | errors.VALUE_NUMBER_TOO_SMALL_ERROR | VALUE_NUMBER_TOO_SMALL_ERROR数値下限エラー | | errors.VALUE_STRING_ERROR | VALUE_STRING_ERROR文字列エラー | | errors.VALUE_STRING_INVALID_ERROR | VALUE_STRING_INVALID_ERROR文字列不正エラー | | errors.VALUE_STRING_TOO_LONG_ERROR | VALUE_STRING_TOO_LONG_ERROR文字列長上限エラー | | errors.VALUE_STRING_TOO_SHORT_ERROR | VALUE_STRING_TOO_SHORT_ERROR文字列長下限エラー | | errors.VALUE_TYPE_ERROR | VALUE_TYPE_ERROR値種別エラー | | errors.VALUE_TYPE_INVALID_ERROR | VALUE_TYPE_INVALID_ERROR値種別不正エラー | | status.400 | Bad Request不正なリクエスト | | status.401 | Authentication is required認証が必要です | | status.403 | You don't have permissions権限がありません | | status.404 | Could not find resourceリソースが見つかりません | | status.500 | Something wrong with the serverサーバーでエラーが発生しました | | status.502 | Bad gateway errorゲートウェイエラー | | status.503 | Server not available混雑中 |

License

This software is released under the MIT License.

Links