Skip to content

About

The base adapter for Toshihiko.js

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Toshihiko Base Adapter

Build Status Coverage Status

Toshihiko Base Adapter is a TypeScript library for extending object properties and providing basic database adapter functionalities.

Installation

Install the package using npm:

npm install --save @toshihiko/base-adapter

Usage

Extending Object Properties

The extend function is used to extend the properties of an object.

import { extend } from '@toshihiko/base-adapter';

const defaultOptions = { a: 1, b: { c: 2 } };
const options = { b: { d: 3 }, e: 4 };
const result = extend(defaultOptions, options);

console.log(result);
// Output: { a: 1, b: { c: 2, d: 3 }, e: 4 }

Database Adapter

The Adapter class provides basic database adapter functionalities.

import { Adapter, AdapterOptions } from '@toshihiko/base-adapter';

const options = { key: 'value' };
const adapter = new Adapter<{ key: string }>(options);

adapter.find({}, {}).catch(err => console.error(err.message));
// Output: this adapter's find function is not implemented yet.

Contributing

Feel free to submit issues and pull requests to improve this project.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

The base adapter for Toshihiko.js

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages