JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q59170F
  • License Apache-2.0

The text of Moby Dick by Herman Melville.

Package Exports

  • @stdlib/datasets-moby-dick
  • @stdlib/datasets-moby-dick/lib/browser.js
  • @stdlib/datasets-moby-dick/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stdlib/datasets-moby-dick) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Moby Dick

NPM version Build Status Coverage Status

The text of Moby Dick by Herman Melville.

Installation

npm install @stdlib/datasets-moby-dick

Usage

var text = require( '@stdlib/datasets-moby-dick' );

text()

Returns the text of Moby Dick.

var data = text();
// returns [{...},{...},...]

Each array element has the following fields:

  • chapter: chapter number or identifier.
  • title: chapter title (if available; otherwise, empty).
  • text: chapter text.

Examples

var text = require( '@stdlib/datasets-moby-dick' );

var data;
var i;

data = text();
for ( i = 0; i < data.length; i++ ) {
    console.log( 'Character Count: %d', data[ i ].text.length );
}

CLI

Installation

To use the module as a general utility, install the module globally

npm install -g @stdlib/datasets-moby-dick

Usage

Usage: moby-dick [options]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.
         --format fmt          Output format: 'txt' or 'ndjson'.

Notes

  • The CLI supports two output formats: plain text (txt) and newline-delimited JSON (NDJSON). The default output format is txt.

Examples

$ moby-dick
CONTENTS


ETYMOLOGY.

EXTRACTS (Supplied by a Sub-Sub-Librarian).


CHAPTER 1. Loomings.

...

License

The data files (databases) are licensed under an Open Data Commons Public Domain Dedication & License 1.0 and their contents are licensed under Creative Commons Zero v1.0 Universal. The software is licensed under Apache License, Version 2.0.


Notice

This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.

Community

Chat


Copyright © 2016-2022. The Stdlib Authors.