Package Exports
- @ydbjs/core
Readme
@ydbjs/core
The @ydbjs/core package provides core utilities and foundational components for interacting with YDB services in JavaScript/TypeScript. It serves as the backbone for other YDB-related packages, offering shared functionality and abstractions.
Features
- Core utilities for YDB service interaction.
- TypeScript support for type safety and autocompletion.
- Lightweight and modular design.
- Compatible with Node.js and modern JavaScript runtimes.
Installation
To install the package, use your preferred package manager:
npm install @ydbjs/core@6.0.0-alpha.2Usage
Create generic gRPC Client
import { Driver } from '@ydbjs/core';
// Example usage
let driver = new Driver("grpc://localhost:2136");
await driver.ready()
let client = driver.createClient(/* gRPC Service Defenitions */)
client.invokeSomeMethod()Development
Building the Package
To build the package, run:
npm run buildThis will generate both CommonJS and ES Module outputs in the dist/ directory.
Running Tests
To run the tests, use:
npm testFor watch mode during development:
npm run test:watchContributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes with clear messages.
- Submit a pull request.
License
This project is licensed under the Apache 2.0 License.