@ocfl/ocfl

0.2.2 • Public • Published

ocfl-js - Common modules

This is JavaScript/Node.js library to create and interact with Oxford Common File Layout (OCFL) storage and objects within it. This package contains abstract classes definition. Do not use this package directly. To work with an actual OCFL storage and object, use the following concrete implementation:

  • ocfl-fs - File system backend

Extensions

This library by default includes all the community extensions defined in the OCFL Community Extensions page. The implementation is organised in the ocfl-extensions package.

To implement a local extension in this library, first follow the description in that page, then create a function like in the following example:

const ocfl = require(ocfl-fs);
ocfl.extensions['9999-local-test'] = function (Storage, Object) {

   
}

Implementation

A new data store backend can be implemented by creating a new package with a store class that extends the OcflStore class and implements its methods. Please see the source code of ocfl-fs as an example implementation

Package Sidebar

Install

npm i @ocfl/ocfl

Weekly Downloads

37

Version

0.2.2

License

GPL-3.0-or-later

Unpacked Size

188 kB

Total Files

30

Last publish

Collaborators

  • ptsefton
  • moisbo
  • alvinsw