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
/* | |
To run this file: | |
1. download this code or copy this code and put it in a file, with .js at the end of the filename | |
2. in your command line go to the directory where the code is | |
3. input in your command line: node Promise.js (or whatever your filename is called) | |
4. SEE THE SECRET MESSAGE!! | |
*/ | |
function myInnerPromise( 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
'use strict'; | |
const expect = require( 'chai' ).expect; | |
// testing example function f (you normally "require" the file you want to test) | |
function f( x ) { | |
return( x + x + x + x ); | |
} |
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'; | |
const obj = { | |
obj_key_1: 'obj_value_1', | |
obj_key_2: 'obj_value_2', | |
obj_key_3: 'obj_value_3' | |
}; | |
const arr = [ 'array_value_1', 'array_value_2', 'array_value_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
test |
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
header.payload.signature |
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'; | |
var M = Math; | |
var L = [ 0, 0 ]; | |
function F() { | |
return M.floor( 2 * M.random() ) ? 'head' : 'tail'; | |
} |
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'; | |
const f = ( x, r ) => { | |
return Promise[ r ]( 2 * x ) | |
.then( y => { | |
throw y; | |
}, | |
z => { |
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'; | |
const ROOT_PATH = '../../'; | |
const MODULE_PATH = 'lib/filename'; | |
const FULL_MODULE_PATH = ROOT_PATH + MODULE_PATH; | |
const isDeepFrozen = require( 'is-deep-frozen' ); |
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'; | |
const React = require( 'react' ); | |
const e = React.createElement; | |
module.exports = class MegaGreenSquare extends React.Component { | |
render() { |
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'; | |
const vandium = require( 'vandium' ); | |
const getSizeOfWebsitePromise = require( | |
'./lambda_function_logic/get_size_of_website_promise' | |
); | |
const websiteUrlRegex = /^https:\/\/lessonshop.net$|^https:\/\/vandium.io$|https:\/\/github.com$/; |
OlderNewer