UNPKG
node-mock-server
Version:
alpha (0.19.0-alpha)
alpha-1 (0.18.0)
alpha-2 (0.18.0-alpha-2)
alpha-3 (0.18.0-alpha-3)
latest (0.25.4)
0.25.4
0.25.3
0.25.2
0.25.0
0.24.0
0.23.8
0.23.7
0.23.6
0.23.5
0.23.4
0.23.3
0.23.2
0.23.1
0.23.0
0.22.1
0.22.0
0.21.0
0.20.0
0.19.1
0.19.0
0.19.0-alpha
0.18.2
0.18.1
0.18.0
0.18.0-alpha-3
0.18.0-alpha-2
0.17.4
0.17.3
0.17.2
0.17.1
0.17.0
0.16.0
0.15.1
0.15.0
0.14.0
0.13.0
0.12.1
0.12.0
0.11.0
0.10.0
0.9.0
0.8.2
0.8.1
0.8.0
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.4
File based Node REST API mock server
github.com/smollweide/node-mock-server
node-mock-server
/
lib
/
getCertificate.js
14 lines
(10 loc)
•
249 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'use strict'
;
var
Utils
=
require
(
'./Utils'
);
var
utils =
new
Utils
();
function
getCertificate
(
pathOrFile
) {
if
(pathOrFile.
split
(
'\n'
).
length
>
1
) {
return
pathOrFile; }
return
utils.
readFile
(pathOrFile); }
module
.
exports
= getCertificate;