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

lib/ResourceIdentifier.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 14
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
mnd 0
bc 0
fnc 2
dl 0
loc 14
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10
1
"use strict";
2
Object.defineProperty(exports, "__esModule", { value: true });
3
var monocle_ts_1 = require("monocle-ts");
4
exports.ResourceIdentifier = {
5
    iso: {
6
        string: new monocle_ts_1.Iso(function (s) { return s.type + ":" + s.id; }, function (a) {
7
            var strings = a.split(':');
8
            return {
9
                type: strings[0],
10
                id: strings[1]
11
            };
12
        })
13
    }
14
};
15