@kapitchi/bb-content-copy

0.3.0 • Public • Published

bb-content-copy

TODO

Installation

npm install @kapitchi/bb-content-copy

Usage

TODO

API

Classes

CopyService

Content copy service

Typedefs

HttpMethod : Object
FilesystemMethod : Object

CopyService

Content copy service

Kind: global class

new CopyService(copyServiceOpts, copyServiceMessagePublisher)

Param Type Description
copyServiceOpts Object
copyServiceOpts.progressUpdatePeriod number How often is copyServiceProgress.next() is called
copyServiceMessagePublisher Object
copyServiceMessagePublisher.next function

copyService.copy(params) ⇒ Promise

Copy source to destination

Kind: instance method of CopyService

Param Type Description
params Object
params.id string Unique copy operation ID
params.source FilesystemMethod | HttpMethod
[params.source.size] number Content size (if not provided it will be detected)
[params.source.mime] number MIME type of the content (if not provided it will be detected)
params.destination FilesystemMethod | HttpMethod

HttpMethod : Object

Kind: global typedef
Properties

Name Type Description
type string Value: http
url string
method string HTTP method
headers Object

FilesystemMethod : Object

Kind: global typedef
Properties

Name Type Description
type string Value: filesystem
path string File path

Development

Run the command below before release.

npm run build

Tests

npm test

Contribute

Please feel free to submit an issue/PR or contact me at matus.zeman@gmail.com.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @kapitchi/bb-content-copy

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

39 kB

Total Files

15

Last publish

Collaborators

  • matuszeman