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

kyusu / mahakala / 3643897255

pending completion
3643897255

Pull #217

github

GitHub
Merge 740288070 into 96fbe0e0d
Pull Request #217: Bump qs from 6.5.2 to 6.5.3

2 of 2 branches covered (100.0%)

Branch coverage included in aggregate %.

51 of 51 relevant lines covered (100.0%)

2.61 hits per line

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

100.0
/parseConfigFile.js
1
const tryCatch = require('crocks/Result/tryCatch');
2✔
2
const {unary} = require('crocks/helpers');
2✔
3
const resultToAsync = require('crocks/Async/resultToAsync');
2✔
4
const {liftFn} = require('./AsyncReader.js');
2✔
5

6
/**
7
 * Takes a string and tries to parse it. Wraps the result into Result instance. When parsing fails, the error is wrapped
8
 * in a Result.Err instance, when the parsing succeeds the result is wrapped in a Result.Ok instance
9
 * @type(function(string): Result)
10
 */
11
const safeJSONParse = tryCatch(unary(JSON.parse));
2✔
12

13
/**
14
 * Takes the configuration files as string (inside a AsyncReader instance) and tries to parse it. Failed attempts are
15
 * returned as a rejected AsyncReader instance containing the error and successful attempts are returned as a resolved
16
 * AsyncReader instance containing the object
17
 * @type(function(AsyncReader.<string>): AsyncReader.<object>)
18
 */
19
const parseConfigFile = liftFn(resultToAsync(safeJSONParse));
2✔
20

21
module.exports = parseConfigFile;
2✔
22

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