MCPcopy Create free account
hub / github.com/share/sharedb / normalizedProtocol

Function normalizedProtocol

lib/protocol.js:15–28  ·  view source on GitHub ↗
(protocol)

Source from the content-addressed store, hash-verified

13}
14
15function normalizedProtocol(protocol) {
16 if (typeof protocol === 'string') {
17 var segments = protocol.split('.');
18 protocol = {
19 major: segments[0],
20 minor: segments[1]
21 };
22 }
23
24 return {
25 major: +(protocol.protocol || protocol.major || 0),
26 minor: +(protocol.protocolMinor || protocol.minor || 0)
27 };
28}

Callers 1

checkAtLeastFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…