You know that feeling where you want to describe something, but you don’t know the correct or accurate term to label it as? That was me whenever I encountered code or filenames where the letters were all lowercased and the words were separated with a dash.
what-am-i
While I was reading through the Angular 2 docs, I finally learned a term for that naming convention: it’s the kebab case!
You may see others refer to it as:
- Lisp case
- Spinal case
- Dash case
The act of transforming your strings into the kebab case is known as dasherizing. There’s even a npm module that will take care of that for you.
Code has never looked so tasty before.
Dave Beck says
I’d never really thought about the name before. I assume it’s called kebab because the dashes make it look like it’s skewered a-la shish-kebab?