Skip to content

Instantly share code, notes, and snippets.

View themonster2015's full-sized avatar
👋

Yen Vo themonster2015

👋
  • Spain
View GitHub Profile
@coryhouse
coryhouse / install.sh
Last active August 23, 2021 01:53
Dependencies for React Auth0 on Pluralsight - Last Updated 7/15/2020
npm install auth0-js@9.13.4 auth0-lock@11.25.1 express@4.17.1 express-jwt@5.3.1 express-jwt-authz@1.0.0 jwks-rsa@1.3.0 npm-run-all@4.1.5 react-router-dom@5.2.0
@danyaljj
danyaljj / sort_map_js
Created July 16, 2015 23:03
Sort map by its keys and return another map in Javascript
sortMapByValue(map) {
var tupleArray = [];
for (var key in map) tupleArray.push([key, map[key]]);
tupleArray.sort(function (a, b) {
return b[1] - a[1]
});
var sortedMap = {};
tupleArray.forEach(function (el) {
sortedMap[el[0]] = el[1]
});