Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@evidentpoint/readium-cfi-js

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evidentpoint/readium-cfi-js

Readium - CFI javascript library

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
decreased by-65.96%
Maintainers
3
Weekly downloads
 
Created
Source

readium-cfi-js

EPUB3 CFI utility library in JavaScript

This is a software component used by other Readium projects, see https://github.com/readium/readium-shared-js

License

BSD-3-Clause ( http://opensource.org/licenses/BSD-3-Clause )

See license.txt.

Installation

Using npm / yarn

npm install readium-cfi-js or yarn add readium-cfi-js

Importing

This library is bundled in UMD and ES module formats.

  • CommonJS
const EPUBcfi = require('readium-cfi-js');
  • ES Module
import * as EPUBcfi from '@evidentpoint/readium-cfi-js';
  • Globally with window.EPUBcfi
<script src="readium-cfi.umd.js"></script>

Usage in non-browser environments (Node)

Currently not supported as the implementation depends on jQuery and the DOM.

A subset of the API could work without a browser, which may be planned for a future release.

Development

Prerequisites:

Initial setup:

  • npm install (to download dependencies defined in package.json ... note that the --production option can be used to avoid downloading development dependencies, for example when testing only the pre-built dist folder contents)

Typical workflow:

  • Hack away! (mostly the source code in ./src and ./spec/models )
  • npm run build (to update the output bundles in the dist folder)

Unit tests:

  • npm run test (Karma launcher)

Travis (Continuous Integration): https://travis-ci.org/readium/readium-cfi-js/

Bundled outputs

The dist directory contains bundled scripts in two module formats:

UMD - Universal Module Definition

readium-cfi.umd.js (and its associated source-map file), which aggregates all the required code (external library dependencies included, such as jQuery, etc.)

You can include this as CommonJS/AMD or with the global EPUBcfi

Works best for when using Browserify or RequireJS

ES Modules

readium-cfi.esm.js (and its associated source-map file), also aggregates all the required code

Works best for rollup.js or webpack

NPM package

All packages "owned" and maintained by the Readium Foundation are listed here: https://www.npmjs.com/~readium

Keywords

FAQs

Package last updated on 14 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc