opendal
TypeScript icon, indicating that this package has built-in type declarations

0.48.3 • Public • Published

Apache OpenDAL™ Node.js Binding

npm Website

Useful Links

Installation

npm install opendal

Docs

To build the docs locally, please run the following commands:

# Only need to run once unless you want to update the docs theme
pnpm run build:theme

# Build the docs
pnpm run docs

Tests

Services behavior tests read necessary configs from env vars or the .env file.

You can copy .env.example to $(pwd)/.env and change the values on need, or directly set env vars with export KEY=VALUE.

Take fs for example, we need to enable bench on fs on /tmp:

OPENDAL_TEST=fs
OPENDAL_FS_ROOT=/tmp

You can run service behavior tests of enabled with the following command:

pnpm build && pnpm test

Usage

import { Operator } from "opendal";

async function main() {
  const op = new Operator("fs", { root: "/tmp" });
  await op.write("test", "Hello, World!");
  const bs = await op.read("test");
  console.log(new TextDecoder().decode(bs));
  const meta = await op.stat("test");
  console.log(`contentLength: ${meta.contentLength}`);
}

main();

Contributing

License and Trademarks

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.48.37latest

Version History

VersionDownloads (Last 7 Days)Published
0.48.37
0.47.11234
0.47.8
0
0.47.7
0
0.47.6
2
0.47.5
0
0.47.4
0
0.47.3
0
0.47.2
0
0.47.1
0
0.47.0
0
0.46.2
0
0.46.1
0
0.45.2
0
0.45.1
45
0.45.0
0
0.44.2
0
0.44.1
0
0.44.0
0
0.42.0
0
0.41.0
0
0.40.0
0
0.39.0
0
0.38.1
0
0.38.0
0
0.37.0
0
0.36.1
0
0.36.0
0
0.35.0
0
0.34.0
0
0.33.3
0
0.33.2
0
0.33.1
0
0.32.00
0.31.10
0.30.50
0.30.40
0.30.30
0.30.20
0.0.10

Package Sidebar

Install

npm i opendal

Weekly Downloads

288

Version

0.48.3

License

Apache-2.0

Unpacked Size

52.3 kB

Total Files

8

Last publish

Collaborators

  • xuanwo
  • vp-brand-asf
  • theasf
  • suyanhanx