image-testdata

1.0.0 • Public • Published

image-testdata

NPM version Travis Build Status Coverage Status

Images for use in test-cases

Installation

npm install image-testdata

Usage

The following example demonstrates how to use this module:

const imageTestdata = require('image-testdata')
const fs = require('fs')

Promise.all([
  // Image without XMP:Identifier
  imageTestdata('no-xmp-identifier.jpg', 'tmp'),

  // Image with XMP:Identifier
  imageTestdata('with-xmp-identifier.jpg', 'tmp'),

  // Save by another name
  imageTestdata('with-xmp-identifier.jpg', 'tmp', {renameTo: 'img.jpg'})

])
  .then((files) => console.log('Return value', files))
  .then((files) => console.log('Directory listing', fs.readdirSync('tmp')))

This will generate the following output

Return value [ 'tmp/no-xmp-identifier.jpg',
  'tmp/with-xmp-identifier.jpg',
  'tmp/img.jpg' ]
Directory listing [ 'img.jpg', 'no-xmp-identifier.jpg', 'with-xmp-identifier.jpg' ]

License

image-testdata is published under the MIT-license.

See LICENSE.md for details.

Release-Notes

For release notes, see CHANGELOG.md

Contributing guidelines

See CONTRIBUTING.md.

Readme

Keywords

none

Package Sidebar

Install

npm i image-testdata

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

49.7 kB

Total Files

7

Last publish

Collaborators

  • knappi