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
defmodule('Contestation', ({ def, run, callbacks }) => { | |
const { Http } = Defy.Plugins | |
const storageURL = `${process.env.SANDFILE_URL}/document` | |
const graphQLURL = process.env.GRAPHQL_URL | |
def('post_document', doc => { | |
const requestPayload = { | |
query: mutationBuilder(doc, 'addDocument', 'errors { code path description } }') | |
} |
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 simpleFp() { | |
const Utils = { | |
getFunctionArity(fn) { | |
return fn.length | |
}, | |
getFunctionModule(fnName, fnArity) { | |
const fnPath = fnName.split('.') | |
const isOuter = fnPath.length > 1 | |
if (isOuter) { |
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 createObservable(observable, { onGet, onSet }) { | |
const interceptor = { | |
get(target, key, receiver) { | |
onGet(key) | |
return target[key] | |
}, | |
set(target, prop, value) { | |
onSet(prop, value) | |
return true | |
} |
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(obj) { | |
'use strict'; | |
/* | |
* @name: isURL | |
* @description: Checks if a String is an URI | |
* | |
* @param String : The string to be checked | |
*/ |
NewerOlder