Skip to content

Instantly share code, notes, and snippets.

@avinashgardas
avinashgardas / index.js
Created May 16, 2021 19:18
Fetch YouTube playlists with all playlist-items from a YouTube channel in NodeJS
const express = require("express");
const { getData } = require("./youtube/youtube-channel-videos-with-playlist");
const router = express.Router();
router.get("/youtube/playlists", getData);
module.exports = router;
@avinashgardas
avinashgardas / timeAgo.js
Last active March 26, 2018 18:14
Time ago function in javascript (example: 3 days ago)
function console(msg) {
var pre = document.createElement('pre')
pre.innerHTML = msg
document.body.appendChild(pre)
}
function getFeedbackTime(feedbackTimestamp) {
/*
Note: timestamp structure
2018 - 03 - 26 T 1 4 : 2 7 : 4 8 . 5 0 8 Z