UNPKG
libdom-http
Version:
latest (0.2.7)
0.2.7
0.2.6
0.2.5
0.2.1
0.2.0
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.8
0.0.7
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
Http support for libdom
github.com/diko316/libdom-http
diko316/libdom-http
libdom-http
/
src
/
lib
/
transform
/
response-text-plain.js
20 lines
(14 loc)
•
311 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict'
;
import
{
number
,
string
}
from
"libcore"
;
function
convert
(
data
) {
if
(
number
(data)) { data = data.
toString
(
10
); }
return
[
'Content-type: text/plain'
,
string
(data) ? data :
''
]; }
export
default
convert;