camelCase = theFirstIsSmallTheRestIsCapital
kabeb-case = meaning-only-lower-case-and-a-z-and-dash-and-numbers
PascalCase = JustAlphaAndAlwaysCapitalWords
kabeb-case
Prefix so that get away form namespace clashes.
.cory = corifeus
.cory-something { font-family: "Corifeus"; }
kabeb-case
Prefix so that get away form namespace clashes. It is both for tags and attributes.
cory = corifeus
<cory-element cory-attribute="kabeb-case" class="cory-something"/>
kabeb-case
https://localhost/very-long-sentance/is/just/kebab-case.html
kabeb-case
/module-one/love/live/path.js
/try/code-style/by/class.js
kabeb-case
// function
camel-case.js
// class
camel-case-is-kebab-as-well.js
// html file
kabeb-case.html
// regular file
kebab-case.any
kabeb-case.js
kabeb-case.pdf
kabeb-case.html
kabeb-case.css
camelCase
The namespace = corifeus
// JavaScript
global.corifeus.camelCase = () => console.log('camelCase');
global.corifeus.camelCase = class camelCaseClass {};
camelCase
// JavaScript
const variableIsCool = 'camelCase';
let anotherVariable = false;
var oldTypeVariable = 'cool';
camelCase
// JavaScript
function justSimpleFunction() {
console.log('alsoCamelCase')
}
I prefer camelCase
, though PascalCase
is fine.
// JavaScript
function prototypeBasedClass() {
console.log('likeAClassIsCamelCase');
}
prototypeBasedClass.staticFunction = function() {}
prototypeBasedClass.staticVariable = true;
prototypeBasedClass.prototype.instanceFunction = function() {}
prototypeBasedClass.prototype.instanceVariable = true;
I rarely use classes, but sometimes it is good, I prefer camelCase
but for classes it is ok to use PascalCase
.
camelCase
// JavaScript
class simpleClass {
constructor() {}
instanceFunctionCamelCase() {}
get instanceProperty() { return true; }
set instanceProperty(value) { this._instanceProperty = value; }
static classMethod() { console.log('camelCase'); }
static get classProperty() { return 'camelCase'; }
}
camelCase
// JavaScript
const objects = {
variableNow: camelCase,
methodName: camelCase,
nameOfTheClass: camelCase,
staticFuncitonName: camelCase.static,
instance: camelCase.variable
}