Client Side Slug Function

Slugify functions are a pain and a frequent DRY violation. Is there a frappe.utils function I use to do this? “Slug” doesn’t seem to find any candidates, perhaps there’s a different terminology that’s being used?

This code looks intriguing from ui.fieldgroup.js

init: function(opts) {
	$.extend(this, opts);
	this._super();
	$.each(this.fields || [], function(i, f) {
		if(!f.fieldname && f.label) {
			f.fieldname = f.label.replace(/ /g, "_").toLowerCase();
		}
	})
	if(this.values) {
		this.set_values(this.values);
	}
},

There is frappe.scrub. I guess slug is the more correct name.

Well, let’s not quibble. Scrub is a perfectly fine name. I’ll find it and make an addition to the documentation.