MCPcopy Index your code
hub / github.com/CodeboxIDE/codebox / extractId

Function extractId

core/cb.addons/require-tools/less/lessc.js:6301–6307  ·  view source on GitHub ↗
(href)

Source from the content-addressed store, hash-verified

6299}
6300
6301function extractId(href) {
6302 return href.replace(/^[a-z-]+:\/+?[^\/]+/, '' ) // Remove protocol & domain
6303 .replace(/^\//, '' ) // Remove root /
6304 .replace(/\.[a-zA-Z]+$/, '' ) // Remove simple extension
6305 .replace(/[^\.\w-]+/g, '-') // Replace illegal characters
6306 .replace(/\./g, ':'); // Replace dots with colons(for valid id)
6307}
6308
6309function errorConsole(e, rootHref) {
6310 var template = '{line} {content}';

Callers 3

createCSSFunction · 0.85
errorHTMLFunction · 0.85
removeErrorHTMLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected