MCPcopy Index your code
hub / github.com/socketstream/socketstream / suggestedId

Function suggestedId

lib/client/template_engine.js:203–213  ·  view source on GitHub ↗
(pth, templatesPath)

Source from the content-addressed store, hash-verified

201 // Suggest an ID for this template based upon its path
202 // 3rd party Template Engine modules are free to use their own naming conventions but we recommend using this where possible
203 function suggestedId(pth, templatesPath) {
204 if (pth.indexOf(templatesPath) === 0) {
205 pth = pth.substring(templatesPath.length + 1);
206 }
207 var sp;
208 sp = pth.split('.');
209 if (pth.indexOf('.') > 0) {
210 sp.pop();
211 }
212 return sp.join('.').replace(/\//g, '-');
213 }
214};
215

Callers 1

wrapTemplateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected