(with 100% code coverage😉👍🏿👍🏽👍🏻)
This file contains 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 getIfValueIsUrl( value ) { | |
const urlRegex = /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi; | |
const valueIsUrl = !!value.match( urlRegex ); | |
return valueIsUrl; | |
} |
This file contains 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
const object = { x: 2, y: 'yo' }; | |
const keys = Object.keys( object ); | |
keys.forEach( key => { | |
const value = object[ key ]; | |
publishValue( value ); | |
}); |
This file contains 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
<title>LessonShop.net</title> | |
<meta charset="utf-8"> | |
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" /> | |
<meta property="og:url" content="https://lessonshop.net" /> | |
<meta property="og:title" content="LessonShop.net" /> | |
<meta property="og:type" content="website" /> | |
<meta property="og:description" content="Lessonshop is a lesson bookings marketplace that allows you to effortlessly take or teach lessons." /> | |
<meta property="og:image" content="https://s3.amazonaws.com/lessonshop.net/other/the_logo_300_new.jpg" /> | |
<meta property="fb:app_id" content="1515460021880400" /> | |
<meta name="description" content="Lessonshop is a lesson bookings marketplace that allows you to effortlessly take or teach lessons." /> |
This file contains 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
return e( | |
'div', | |
{ | |
style: { | |
width: 100, | |
height: 100, | |
backgroundColor: 'green' |
This file contains 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
<html> | |
<head> | |
<title>Developerayo Div Tricks</title> | |
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' /> | |
<style> | |
#oval { |
This file contains 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 getDecodedJWTComponents( token ) { | |
const periodSplitToken = token.split( '.' ); | |
const endcodedJWTHeader = periodSplitToken[0]; | |
const header = getDecodedJWTComponent( endcodedJWTHeader ); | |
const endcodedJWTPayload = periodSplitToken[1]; |
This file contains 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
'use strict'; | |
// Problem: Variables a and b are defined below. How do you swap the values of variables a and b?: | |
let a = 2; // a is now 2 | |
let b = 3; // b is now 3 | |
This file contains 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
'use strict'; | |
let a = 2; // a is now 2 | |
let b = 3; // b is now 3 | |
let c = a; | |
a = b; |
This file contains 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
<html> | |
<head> | |
<title>50 Div Tricks</title> | |
<style> | |
body,html { |
NewerOlder