I hereby claim:
- I am doramatadora on github.
- I am doramatadora (https://keybase.io/doramatadora) on keybase.
- I have a public key ASDJ57Kvtk3HY474MMB1-HmfzTOhPZXu21-etHrqq3jkCQo
To claim this, I am signing this object:
// for when you want to mock/stub chained APIs | |
// useful with stuff like octokit, aws-sdk, neo4j-driver | |
// for avoiding nastiness, like, for e.g. octokit.git.getTree | |
// const octoStub = { octokit: { git: { getTree: jest.fn()) } } } | |
// this mocks/stubs everything to a specified depth | |
function mockChainedAPI(mock: any = jest.fn(), depth: number) { | |
return new Proxy({} as any, { | |
get: function(obj, prop) { | |
obj._depthCount = (obj._depthCount || 0) + 1; |
/\ /\ | |
//\\_//\\ ____ | |
\_ _/ / / | |
/ * * \ /^^^] | |
\_\O/_/ [ ] | |
/ \_ [ / | |
\ \_ / / | |
[ [ / \/ _/ | |
_[ [ \ /_/ |
I hereby claim:
To claim this, I am signing this object:
module.exports = { | |
reactStrictMode: true, | |
webpack: (config, options) => { | |
config.externals = [ | |
({request,}, callback) => { | |
// Allow Webpack to handle fastly:* namespaced module imports by treating | |
// them as modules rather than try to process them as URLs | |
if (/^fastly:.*$/.test(request)) { | |
return callback(null, 'commonjs ' + request); | |
} |
{ | |
"bookstore": { | |
"book": [ | |
{ | |
"id": "001", | |
"title": "The Great Gatsby", | |
"author": "F. Scott Fitzgerald", | |
"publication_year": "1925", | |
"genre": { | |
"@type": "fiction", |
# 💝 Use with jq 💝 | |
# jq -r -f ./xml.jq some.json | |
# cat some.json | jq -r -f ./xml.jq | |
# Download or install jq from: https://jqlang.github.io/jq/download/ | |
# Or: brew install jq | |
# Check out the manual: https://jqlang.github.io/jq/manual/ | |
# To understand how content_key and attr_prefix work, run this script on the following JSON: | |
# https://gist.github.com/doramatadora/5623ea90e63ea1c6a15141e2fea054e8 |
💅 Copy & Paste 💅
🚨 This will wipe away any code in your Glitch project and replace it with the code from Github, and reload your project, every time you push to your repo's
main
branch.
💻 Terminal
and run the following: