# next-core-bundle

> The Augmented.js Next - Resource Bundle.

Latest version **3.2.3** (published 2021-02-08) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install next-core-bundle
pnpm add next-core-bundle
yarn add next-core-bundle
bun add next-core-bundle
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.3 |
| Published | 2021-02-08 |
| First published | 2018-08-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bob Warren |
| Maintainers | thedocbwarren |
| Keywords | augmentedjs, core, i18n, bundle |

## Links

- npm: https://www.npmjs.com/package/next-core-bundle
- Repository: https://github.com/Augmentedjs/next-core-bundle
- Homepage: http://www.augmentedjs.com
- Issues: https://github.com/Augmentedjs/next-core-bundle/issues
- npm.io page: https://npm.io/package/next-core-bundle

## Dependencies (1)

- [string.prototype.replaceall](https://npm.io/package/string.prototype.replaceall.md) ^1.0.4

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 3.2.3 (latest) — 2021-02-08
- 3.2.2 — 2021-02-07
- 3.2.1 — 2021-02-07
- 3.2.0 — 2021-02-07
- 3.1.0 — 2021-02-06
- 2.5.4 — 2020-07-09
- 2.5.3 — 2018-08-20

## README

# next-core-bundle

Augmented.js Next Core - Resource Bundle

## Description

Resource bundles contain locale-specific objects. When your program needs a locale-specific resource, a String for example, your program can load it from the resource bundle that is appropriate for the current user's locale. In this way, you can write program code that is largely independent of the user's locale isolating most, if not all, of the locale-specific information in resource bundles.

This allows you to write programs that can:

-   be easily localized, or translated, into different languages
-   handle multiple locales at once
-   be easily modified later to support even more locales 

# API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [ResourceBundle](#resourcebundle)
    -   [Parameters](#parameters)
    -   [\_fallback](#_fallback)
        -   [Properties](#properties)
    -   [\_bundle](#_bundle)
        -   [Properties](#properties-1)
    -   [\_delimiter](#_delimiter)
        -   [Properties](#properties-2)
    -   [get](#get)
        -   [Parameters](#parameters-1)
    -   [Properties](#properties-3)
    -   [Properties](#properties-4)
    -   [Properties](#properties-5)
-   [MessageKeyFormatter](#messagekeyformatter)
    -   [Parameters](#parameters-2)
    -   [\_delimiter](#_delimiter-1)
        -   [Properties](#properties-6)
    -   [format](#format)
        -   [Parameters](#parameters-3)
-   [MapFormatter](#mapformatter)
    -   [format](#format-1)
        -   [Parameters](#parameters-4)
        -   [Examples](#examples)

## ResourceBundle

ResourceBundle

### Parameters

-   `options`   (optional, default `{}`)

### \_fallback

#### Properties

-   `fallback` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Is fallback support enabled

### \_bundle

#### Properties

-   `bundle` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The bundle used

### \_delimiter

#### Properties

-   `delimiter` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The key delimiter (if fallback is enabled)

### get

Get a string from the bundle by key

#### Parameters

-   `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The key to find in the bundle

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Message from bundle, [key] if not found, or null if missing the key

## 

### Properties

-   `locale` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The locale

## 

### Properties

-   `language` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The language

## 

### Properties

-   `country` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The country

## MessageKeyFormatter

<p>MessageKeyFormatter<br/>

Concatenate the pieces of the message together if a portion of the key is
missing, the rest of the key is ignored. <em>ex. if the "rule" attribute is
missing, then the key will return with the message.level + message.kind only</em></p>

### Parameters

-   `options`   (optional, default `{}`)

### \_delimiter

Key Delimiter

#### Properties

-   `delimiter` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The delimter used to seperate each key

### format

Format a key for a message

#### Parameters

-   `message` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The message to format (optional, default `{}`)

Returns **any** The key to lookup in a bundle

## MapFormatter

MapFormatter - Maps a JSON object of keys to new text

### format

Replaces a string with replacement text from a JSON object.  
Will replace all instances marked with the key name

#### Parameters

-   `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The original string
-   `replacements` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object with replacement strings

#### Examples

```javascript
const message = MapFormatter.format("This is a test of {ebs}.", { "ebs": "the Emergency Broadcast System" });
```

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Returns the string with replaced text

---
_Source: https://npm.io/package/next-core-bundle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
