Closed rezoner closed 9 years ago
I'm accustomed to playground.soundOnDemand.js
because that's Impact JS's convention, but the AirBnB JS Style Guide makes a good point:
If your file exports a single class, your filename should be exactly the name of the class.
// file contents
class CheckBox {
// ...
}
module.exports = CheckBox;
// in some other file
// bad
var CheckBox = require('./checkBox');
// bad
var CheckBox = require('./check_box');
// good
var CheckBox = require('./CheckBox');
If you want to follow that convention, it seems that playground.SoundOnDemand.js
would be the way to go.
Thanks @nknauth - I am going with AirBnB style guide - kinda...
PLAYGROUND.whateverYouPutThere
dictates:
playground.whateverYouPutThere.js
Consider a plugin for a library named
playground
.Library namespace is
var PLAYGROUND = { }
Plugin is represented by a constructor
PLAYGROUND.SoundOnDemand = function() { }
reasonable permutations
What would you pick - and WHY?