Skip to content

Instantly share code, notes, and snippets.

View codedcontainer's full-sized avatar
💭
Learning about GraphQL through a Pluralsight.

codedcontainer

💭
Learning about GraphQL through a Pluralsight.
View GitHub Profile
@codedcontainer
codedcontainer / formatStringArray.js
Created October 16, 2017 17:42
Make every word in a sentence capitalized
function formatReportTitle(objectKeys){
var formattedReportArray = [];
for (a = 0; a <= objectKeys.length -1; a++){ //loop through array of report types/object keys
var splitString = objectKeys[a].split("_"); //slpit the array by "_"
//loop through each string item
for (var b = 0; b <= splitString.length -1; b++ ){
splitString[b] = splitString[b].split(''); //splits string into array of letters
splitString[b][0] = splitString[b][0].toUpperCase(); //makes first letter capitalizes
splitString[b]= splitString[b].join(''); //converts array of letter back to word
}
@codedcontainer
codedcontainer / parallax.ts
Created January 25, 2018 17:34
Parallax with TypeScript
class parallax {
private _backgroundElement:string;
private _containerElement:string;
set containerElement(name: string){
this._containerElement = name;
}
set backgroundElement(name: string){
this._backgroundElement = name;
}