MCPcopy Create free account
hub / github.com/weaveworks/scope / ipToPaddedString

Function ipToPaddedString

client/app/scripts/utils/string-utils.js:85–87  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

83
84// Converts IPs from '10.244.253.4' to '010.244.253.004' format.
85export function ipToPaddedString(value) {
86 return value.match(/\d+/g).map(padToThreeDigits).join('.');
87}
88
89// Doing the manual parsing because `duration.humanize()` would sometimes round up the period,
90// while we always want a rounded down value for consistency with other values sent by backend.

Callers 1

getNodeValueFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…