@mementoweb/client

Time Travel APIs NodeJS library with full support of the Memento protocol.

Usage no npm install needed!

<script type="module">
  import mementowebClient from 'https://cdn.skypack.dev/@mementoweb/client';
</script>

README

memento-client

npm CircleCI Coveralls Codacy branch grade

Time Travel APIs NodeJS library with full support of the Memento protocol, originally adapted from memento-client.

Installation

$ npm install @mementoweb/client

# or using yarn:
$ yarn add @mementoweb/client

# or using pnpm:
$ pnpm add @mementoweb/client

Usage

import MementoClient from '@mementoweb/client'

const client = new MementoClient('https://timetravel.mementoweb.org');
const { mementos: { closest } } = await client.uri('http://cnn.com').mementos('2013');
console.log(closest);

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

License

ISC