A collection of links to the "Master the JavaScript Interview" series of medium stories by Eric Elliott.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function downloadItem(url) { | |
var reader = new FileReader(); | |
fetch(url).then((response) => { | |
return response.blob() | |
}).then((respBlob) => { | |
reader.readAsDataURL(respBlob); | |
reader.onloadend = function() { | |
let elem = document.createElement('a'); | |
elem.download = "true"; | |
elem.href = reader.result; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DRY | |
Usable | |
Secure | |
Tested | |
Robust | |
Readable | |
Accessible | |
Performant | |
Configurable | |
Documented |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPaginatedItems(items, page) { | |
var page = page || 1, | |
per_page = 3, | |
offset = (page - 1) * per_page, | |
paginatedItems = _.rest(items, offset).slice(0, per_page); | |
return { | |
page: page, | |
per_page: per_page, | |
total: items.length, | |
total_pages: Math.ceil(items.length / per_page), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect } from 'react'; | |
import { connect } from 'react-redux'; | |
import CardComponent from '../../common/ui/CardComponent'; | |
import ContractsTable from './ContractsTable'; | |
import { loadMany, selectors } from './slice'; | |
function ContractList(props: any) { | |
const { list, currentPage, query: queryString, filters, dispatch } = props; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "javascript-development-environment", | |
"version": "1.0.0", | |
"description": "JavaScript development environment Pluralsight course by Cory House", | |
"scripts": { | |
}, | |
"author": "Cory House", | |
"license": "MIT", | |
"dependencies": { | |
"whatwg-fetch": "1.0.0" |