open-index/open-npm huggingface dataset:
npm package: @just-web/formatjs
Description: formatjs gizmo for just-web applications
Author: Homa Wong
Latest version: 1.1.2

# @just-web/formatjs

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]

[@just-web/formatjs] provides [Format.JS] support for [@just-web] applications.

It re-exports [@formatjs/intl] so that you can access all functionality of [@formatjs/intl] directly.

## Install

```sh
# npm
npm install @just-web/formatjs

# yarn
yarn add @just-web/formatjs

# pnpm
pnpm install @just-web/formatjs

#rush
rush add -p @just-web/formatjs
```

## Usage

The `formatJSGizmoFn()` accepts the same parameters as `createIntl()` in object from:

```ts
import { justApp } from '@just-web/app'
import { formatJSGizmoFn, createIntlCache } from '@just-web/formatjs'

const cache = createIntlCache()

const app = await justApp({ name: 'your-awesome-app' })
  .with(formatJSGizmoFn({
    config: { locale: 'en', messages: {} },
    cache
  }))
  .create()

app.formatjs.intl.formatMessage({ defaultMessage: 'hello world' })
```

[@just-web]: https://github.com/justland/just-web
[@just-web/formatjs]: https://github.com/justland/just-web/tree/main/plugins/formatjs
[downloads-image]: https://img.shields.io/npm/dm/@just-web/formatjs.svg?style=flat
[downloads-url]: https://npmjs.org/package/@just-web/formatjs
[npm-image]: https://img.shields.io/npm/v/@just-web/formatjs.svg?style=flat
[npm-url]: https://npmjs.org/package/@just-web/formatjs
[@formatjs/intl]: https://formatjs.io/docs/intl/
[Format.JS]: https://formatjs.io/
npm package: @just-web/history
Description: just-web history plugin module
Author: Homa Wong
Latest version: 2.2.2

# @just-web/history

[@just-web/history] provides [history] API for a [@just-web] applications.

## Install

```sh
# npm
npm install @just-web/history

# yarn
yarn add @just-web/history

# pnpm
pnpm install @just-web/history

#rush
rush add -p @just-web/history
```

## Usage

```ts
import { justApp } from '@just-web/app'
import { historyGizmoFn } from '@just-web/history'

const app = await justApp({ name: 'your-awesome-app' })
  .with(historyGizmoFn())
  .create()

app.history...
```

You can also provide a custom history instance:

```ts
import { justApp } from '@just-web/app'
import { historyGizmoFn } from '@just-web/history'
import { createMemoryHistory } from 'history'

const app = await justApp({ name: 'your-awesome-app' })
  .with(historyGizmoFn({ history:createMemoryHistory() }))
  .create()
```

[@just-web]: https://github.com/justland/just-web
[@just-web/history]: https://github.com/justland/just-web/tree/main/plugins/history
[history]: https://github.com/remix-run/history#readme
npm package: @just-web/i18n
Description: just-web i18n plugin module
Author: Homa Wong
Latest version: 2.0.2

# @just-web/i18n

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]

[@just-web/i18n] provides basic i18n support.

The `i18nGizmo` provides changing the language of the application in-memory.
The setting is not persisted.

If you want to persist the setting, you can use other variants such as [@just-web/browser-i18n](../browser-i18n/README.md).

## Install

```sh
# npm
npm install @just-web/i18n

# yarn
yarn add @just-web/i18n

# pnpm
pnpm install @just-web/i18n

#rush
rush add -p @just-web/i18n
```

## Usage

```ts
import { justApp } from '@just-web/app'
import { i18nGizmoFn } from '@just-web/i18n'

const app = await justApp({ name: 'your-app' })
  .extend(i18nGizmoFn(navigator))
  .create()

app.i18n.getLanguage() // 'en'
```

## Commands

It provides a `setLanguageCommand`,
which allows you to set language using command.

```ts
import { justApp } from '@just-web/app'
import { commandsGizmoFn } from '@just-web/commands' // optional
import { keyboardGizmoFn } from '@just-web/keyboard' // optional
import { i18nGizmoFn } from '@just-web/i18n'

const app = await justApp({ name: 'your-app' })
  .extend(commandsGizmoFn())
  .extend(keyboardGizmoFn())
  .extend(i18nGizmoFn(navigator))
  .create()

setLanguageCommand('fr')
```

[@just-web/i18n]: https://github.com/justland/just-web/tree/main/plugins/i18n
[downloads-image]: https://img.shields.io/npm/dm/@just-web/preferences.svg?style=flat
[downloads-url]: https://npmjs.org/package/@just-web/preferences
[npm-image]: https://img.shields.io/npm/v/@just-web/preferences.svg?style=flat
[npm-url]: https://npmjs.org/package/@just-web/preferences
npm package: @just-web/id
Description: Just web ID gizmo
Author: Homa Wong
Latest version: 7.3.2

# @just-web/id

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]

[`IDGizmo`] is a gizmo that provides a name and a randomized id.

This is part of the core [just-web] framework.
Every [just-web] application uses [`IDGizmo`] to provide a name and id.

You normally would not use this package directly,
but instead use the [@just-web/app](../app/README.md) package.

## Usage

```ts
import { justApp } from '@just-web/app'

const app = await justApp({ name: 'my-app' }).create()

// These are provided by the IDGizmo
app.name // 'my-app'
app.id   // '...some random id...'
```

[`IDGizmo`]: ./ts/id_gizmo.ts
[downloads-image]: https://img.shields.io/npm/dm/@just-web/id.svg?style=flat
[downloads-url]: https://npmjs.org/package/@just-web/id
[just-web]: https://github.com/justland/just-web
[npm-image]: https://img.shields.io/npm/v/@just-web/id.svg?style=flat
[npm-url]: https://npmjs.org/package/@just-web/id
npm package: @just-web/keyboard
Description: just-web keyboard plugin module
Author: Homa Wong
Latest version: 7.3.3

# @just-web/keyboard

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]

[@just-web/keyboard] provides functionality about keyboards:

- ✅ Key bindings: shortcuts for all platforms.
- 💡 Key stroke simulation
- 💡 Virtual Keyboard
- 💡 Key stroke capture and display

## Install

```sh
# npm
npm install @just-web/keyboard

# yarn
yarn add @just-web/keyboard

# pnpm
pnpm install @just-web/keyboard

#rush
rush add -p @just-web/keyboard
```

## Usage

```ts
import { justApp } from '@just-web/app'
import { keyboardGizmoFn } from '@just-web/keyboard'

const app = await justApp({ name: 'your-awesome-app' })
  .with(keyboardGizmoFn())
  .create()

app.keyboard.keyBindingContributions
```

It provides a `keyBindingContributions` to register key bindings.

Typically, you don't need to use it directly.
Instead, use `command()` from [@just-web/command](../command/README.md).

[@just-web/keyboard]: https://github.com/justland/just-web/tree/main/plugins/keyboard
[downloads-image]: https://img.shields.io/npm/dm/@just-web/keyboard.svg?style=flat
[downloads-url]: https://npmjs.org/package/@just-web/keyboard
[npm-image]: https://img.shields.io/npm/v/@just-web/keyboard.svg?style=flat
[npm-url]: https://npmjs.org/package/@just-web/keyboard
npm package: @just-web/log
Description: @just-web log module
Author: Homa Wong
Latest version: 7.3.2

# @just-web/log

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]

[@just-web/log] provides logging capability to a [just-web] application.

It is build on top of [standard-log] which supports customization with runtime protection,
sanitization, remote reporting, log level control, etc.

This is part of the core [just-web] framework.
Every [just-web] application uses [`LogGizmo`] to provide logging capability.

You normally would not use this package directly,
but instead use the [@just-web/app](../app/README.md) package.

## Usage

```ts
import { justApp } from '@just-web/app'

const app = await justApp({ name: 'my-app' }).create()

// emits log message to console
app.log.info('some log message')
```

You can customize it behavior by providing the `log` option when creating the application:

```ts
const app = await justApp({
  name: 'my-app',
  log: {
    // define the log level (default: `logLevels.info`)
    logLevel: logLevels.all,
    // define reporters to handle the log messages (default: color console reporter)
    reporters: [reporter],
    /// add custom log levels
    customLevels: {
      happy: 500
    }
  }
})

// the `happy()` method will be available
app.log.happy('some log message')
```

You can create a logger with the `getLogger()` method:

```ts
// logger id: `my-app:something`
const log = app.log.getLogger('something')
```

If you do not pass in and id,
you will get the base logger:

```ts
// logger id: `my-app`
const logger = app.log.getLogger()
```

You can also create a "non-console" logger,
which will not emit log message to console.

```ts
const log = app.log.getNonConsoleLogger('something')
```

Besides [`LogGizmo`],
there are also functions re-exported from [standard-log].
For more information, please refer to the [standard-log] documentation.

[`LogGizmo`]: ./ts/log_gizmo.ts
[@just-web/log]: https://github.com/justland/just-web/tree/main/frameworks/log
[downloads-image]: https://img.shields.io/npm/dm/@just-web/log.svg?style=flat
[downloads-url]: https://npmjs.org/package/@just-web/log
[npm-image]: https://img.shields.io/npm/v/@just-web/log.svg?style=flat
[npm-url]: https://npmjs.org/package/@just-web/log
[just-web]: https://github.com/justland/just-web
[standard-log]: https://github.com/unional/standard-log
npm package: @just-web/os
Description: just-web os plugin module
Author: Homa Wong
Latest version: 7.3.2

# @just-web/os

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]

[@just-web/os] provides Operating System specific implementations for core features for a [@just-web] applications.

Architecturally, under the lens of [Clean Architecture],
[@just-web/os] provides the adaptors and external details related to operating systems.

## Install

```sh
# npm
npm install @just-web/os

# yarn
yarn add @just-web/os

# pnpm
pnpm install @just-web/os

#rush
rush add -p @just-web/os
```

## Usage

```ts
import { justApp } from '@just-web/app'
import { osGizmo } from '@just-web/os'

const app = await justApp({ name: 'your-awesome-app' })
  .with(osGizmo)
  .create()

app.os.isMac()
```

[@just-web]: https://github.com/justland/just-web
[@just-web/os]: https://github.com/justland/just-web/tree/main/plugins/os
[Clean Architecture]: https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
[downloads-image]: https://img.shields.io/npm/dm/@just-web/os.svg?style=flat
[downloads-url]: https://npmjs.org/package/@just-web/os
[npm-image]: https://img.shields.io/npm/v/@just-web/os.svg?style=flat
[npm-url]: https://npmjs.org/package/@just-web/os