Passed
Push — master ( 746cb5...4ed6ec )
by Alberto
47s queued 11s
created

lib/io/ArrayC.js   A

Complexity

Total Complexity 10
Complexity/F 2

Size

Lines of Code 15
Function Count 5

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 10
eloc 14
mnd 5
bc 5
fnc 5
dl 0
loc 15
bpm 1
cpm 2
noi 4
c 0
b 0
f 0
rs 10
1
"use strict";
2
var __importStar = (this && this.__importStar) || function (mod) {
3
    if (mod && mod.__esModule) return mod;
4
    var result = {};
5
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6
    result["default"] = mod;
7
    return result;
8
};
9
Object.defineProperty(exports, "__esModule", { value: true });
10
var function_1 = require("fp-ts/lib/function");
11
var t = __importStar(require("io-ts"));
12
var is = function () { return function (u) { return u instanceof Array; }; };
13
exports.ArrayC = function () { return new t.Type('Array', is(), function (u, c) { return is()(u)
14
    ? t.success(u)
15
    : t.failure(u, c); }, function_1.identity); };
16