1.0.5 • Published 2 months ago

@joshdb/json v1.0.5

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
2 months ago

Josh Logo

@joshdb/json

A provider for @joshdb/core

GitHub npm

Description

Want to safely store your data in JSON files? This is the package for you.

Features

  • Written in TypeScript
  • Offers CommonJS and ESM bundles
  • Fully tested

Installation

Using Yarn

yarn add @joshdb/json@next

Using NPM

npm i @joshdb/json@next

Provider Options

interface Options {
  /**
   * The directory name for data. Defaults to "data".
   * @since 2.0.0
   */
  dataDirectory?: string;

  /**
   * The max amount of keys in a single chunk. Defaults to 100.
   * @since 2.0.0
   */
  maxChunkSize?: number;

  /**
   * The epoch for chunk generation.
   * @since 2.0.0
   */
  epoch?: number | bigint | Date;

  /**
   * Whether to synchronize data when the provider is initiated.
   * @since 2.0.0
   */
  synchronize?: boolean;

  /**
   * The retry options for this provider to use.
   * @since 2.0.0
   */
  retry?: File.RetryOptions;
}
2.1.0

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago