-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.replrc.js
More file actions
29 lines (26 loc) · 767 Bytes
/
.replrc.js
File metadata and controls
29 lines (26 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// .replrc.js
// import {fetch as fetchPolyfill} from 'whatwg-fetch'
const _ = require('lodash');
const wgf = require('whatwg-fetch');
const chalk = require('chalk');
const makeRequest = () => {
fetch('https://inf.wefindx.com/topics/')
.then(function(response) {
return response.json()
}).then((data) => {
return data
})
}
module.exports = {
context: [
{name: 'l', value: _},
{name: 'meaningOfLife', value: 42},
{name: 'fetch', value: wgf.fetch},
{name: 'm', value: makeRequest},
],
banner: (context, pkg) => {
console.log(chalk.bold(`Welcome to the REPL for Data-Browser ${pkg.version}.`));
console.log(chalk.green('Happy hacking!'));
console.log(chalk.cyan('Context:'), _.keys(context).sort().join(', '));
}
}