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
// Usage: | |
// const [verifier, challenge] = await createVerifierChallenge(); | |
import * as Random from 'expo-random'; | |
import * as Crypto from 'expo-crypto'; | |
if (typeof Buffer === 'undefined') { | |
global.Buffer = require('buffer').Buffer; | |
} |
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
import React from 'react'; | |
export default ({ | |
width = 10, | |
height = 10, | |
space = 10, | |
radius = 1.5, | |
fill = '#000', | |
}) => { | |
const viewWidth = width * radius * 2 + (width - 1) * (space - radius * 2); |
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 getUserConfirmation = (location, callback) => { | |
const [newUrl, action] = location.split('|'); | |
// Check if user wants to navigate to the same page. | |
// If so, we don't want to trigger the page transitions. | |
// We have to check the `action`, because the pathnames | |
// are the same when going back in history 🤷 | |
const currentUrl = `${window.location.pathname}${window.location.search}`; | |
if (newUrl === currentUrl && action === 'PUSH') { | |
callback(false); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import React from 'react'; | |
import { CSSTransition, TransitionGroup } from 'react-transition-group'; | |
export const replaceComponentRenderer = ({ props }) => { | |
const children = React.createElement(props.pageResources.component, props); | |
return ( | |
<div> | |
<TransitionGroup> | |
<CSSTransition key={props['*']} timeout={200} classNames="fade"> |
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 objHasProps = (obj, props) => { | |
const check = props.map(prop => prop in obj) | |
return check.indexOf(false) === -1; | |
} | |
const obj = { a: 1, b: 2, c: 3 }; | |
if (objHasProps(obj, ['a', 'c'])) { | |
// ... |
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
var Example = React.createClass({ | |
render: function() { | |
return( | |
React.createElement('div', null, 'Hello from the other side!') | |
); | |
} | |
}); |
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
import React from 'react'; | |
class Columns extends React.Component { | |
render() { | |
var columnFirst = [] | |
var columnSecond = [] | |
this.props.nodes.map(function(node, index) { | |
if(index % 2 == 0) { | |
columnFirst.push(node) | |
} else { |
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
{ | |
"name": "plugin", | |
"description": "plugin description.", | |
"devtools_page": "plugin.html", | |
"permissions": [ | |
"http://*/*", | |
"https://*/*" | |
], | |
"manifest_version": 1, | |
"version": "1" |
NewerOlder