Skip to content

Instantly share code, notes, and snippets.

View arkumish's full-sized avatar
🤘
Enhancing

Arpit Kumar Mishra arkumish

🤘
Enhancing
  • Deutsche Bank
  • India
View GitHub Profile
@chl03ks
chl03ks / capitalizefirst.pipe.ts
Created August 11, 2016 15:13
An Angular 2 pipe to capitalize the first letter of a string value.
import { Pipe, PipeTransform } from '@angular/core';
/*
* Capitalize the first letter of the string
* Takes a string as a value.
* Usage:
* value | capitalizefirst
* Example:
* // value.name = daniel
* {{ value.name | capitalizefirst }}
* fromats to: Daniel
@rchougule
rchougule / asyncWaterfall.js
Created September 28, 2020 21:07
Async Waterfall in JavaScript
function selectMovie(input, callback) {
const output = `Movie Selected: ${input} ->`;
callback(null, output);
}
function bookTicket(input, callback) {
const output = `${input}, Ticket ID: 1234 ->`;
callback(null, output);
}