MCPcopy Index your code
hub / github.com/awesome-opencode/awesome-opencode / slugify

Function slugify

scripts/utils/yaml.js:45–50  ·  view source on GitHub ↗

* Convert a name to a filename-safe slug * @param {string} name - Entry name * @returns {string} Slugified filename (without extension)

(name)

Source from the content-addressed store, hash-verified

43 * @returns {string} Slugified filename (without extension)
44 */
45function slugify(name) {
46 return name
47 .toLowerCase()
48 .replace(/[^a-z0-9]+/g, '-')
49 .replace(/^-+|-+$/g, '');
50}
51
52module.exports = { readYamlFile, readYamlDir, slugify };

Callers 1

buildProductIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected