Skip to content

Instantly share code, notes, and snippets.

View danieldelcore's full-sized avatar
🐙
Say hello!

Daniel Del Core danieldelcore

🐙
Say hello!
View GitHub Profile
@danieldelcore
danieldelcore / 01-directory-structure.md
Created December 20, 2017 23:15 — forked from tracker1/01-directory-structure.md
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@danieldelcore
danieldelcore / stringUtils.js
Created July 4, 2016 04:39 — forked from cvergne/stringUtils.js
Little javascript method to get initials from a name
String.prototype.getInitials = function(glue){
if (typeof glue == "undefined") {
var glue = true;
}
var initials = this.replace(/[^a-zA-Z- ]/g, "").match(/\b\w/g);
if (glue) {
return initials.join('');
}