• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

victorperin / qr-scanner-cli / 7770727734

04 Feb 2024 01:24AM UTC coverage: 92.929%. Remained the same
7770727734

push

github

victorperin
fix(mutation): update stryker

19 of 24 branches covered (0.0%)

Branch coverage included in aggregate %.

73 of 75 relevant lines covered (97.33%)

19.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/src/pipelines/scanFromBitmap.ts
1
import errorHandlers from '../handlers/error'
24✔
2
import readQR from '../infrastructure/qrcode-reader'
24✔
3
import { doFlagClipboard, doOpen } from '../handlers/flags'
24✔
4
import { Flags } from '../cli/flags'
5
import { Bitmap } from '@jimp/core'
6

7
/**
8
 * You can pass a jimp Bitmap, this functions reads it's content and tries to find a QR Code, returning it's result
9
 *
10
 * ```javascript
11
 * import Jimp from 'jimp'
12
 *
13
 * const bitmap = Jimp.read('./image.jpg')
14
 * const value = await scanFromBitmap(bitmap)
15
 * ```
16
 *
17
 * @param bitmap A Bitmap object
18
 * @param flags
19
 * @returns Value read from the QR Code inside the image
20
 */
21
export const scanFromBitmap = (bitmap: Bitmap, flags?: Flags): Promise<string> =>
24✔
22
  Promise.resolve(bitmap)
16✔
23
    .then(readQR)
24
    .then(doFlagClipboard(flags || {}))
16!
25
    .then(doOpen(flags || {}))
16!
26
    .catch(errorHandlers.scanFromBitmap)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc