I hereby claim:
- I am gunn on github.
- I am gunn (https://keybase.io/gunn) on keybase.
- I have a public key ASDHb63l-bFXGCz9UjrugP7wxXjzTjUVC8NUON-63HNA4wo
To claim this, I am signing this object:
function isRecord(record): boolean { | |
// Could be improved, perhaps with use of a Symbol: | |
return record && record._id && (typeof record._id)=="string" | |
} | |
function isSimple(obj): boolean { | |
return !obj || isRecord(obj) || (typeof obj)!="object" | |
} | |
function shallowEqual(objA: any, objB: any): boolean { |
declare var Package: any | |
import { Meteor } from 'meteor/meteor'; | |
import { Tracker } from 'meteor/tracker'; | |
import { useReducer, useState, useEffect, useRef, useMemo, DependencyList } from 'react'; | |
// Warns if data is a Mongo.Cursor or a POJO containing a Mongo.Cursor. | |
function checkCursor (data: any): void { | |
let shouldWarn = false; | |
if (Package.mongo && Package.mongo.Mongo && data && typeof data === 'object') { | |
if (data instanceof Package.mongo.Mongo.Cursor) { |
I hereby claim:
To claim this, I am signing this object:
import * as React from 'react' | |
import { createPortal } from 'react-dom' | |
type FrameProps = React.IframeHTMLAttributes<HTMLIFrameElement> & { | |
head?: React.ComponentType<any> | |
children?: React.ReactNode | |
} | |
const Frame = React.memo(({head, children, ...iframeProps}: FrameProps)=> { | |
const node = React.useRef<HTMLIFrameElement>() | |
const [doc, setDoc] = React.useState<Document>() |
class NumberProxy < BasicObject | |
def initialize number | |
@number = number | |
end | |
def method_missing *args | |
@number.send *args | |
end | |
def inc! |
const camelize = (text, separator="_")=> ( | |
text.split(separator) | |
.map(w=> w.replace(/./, m=> m.toUpperCase())) | |
.join() | |
) |
export default class LinkedList { | |
constructor(value, ...rest) { | |
this.value = value | |
if (rest.length) { | |
this.next = new LinkedList(...rest) | |
} | |
} | |
add(value) { |
const getVersionDetails = ()=> { | |
const MAJOR = 1 | |
const MINOR = 2 | |
const PATCH = 6 | |
const array = [MAJOR, MINOR, PATCH] | |
const object = {MAJOR, MINOR, PATCH} | |
return Object.assign(array, object) | |
} |
const NUMBERS = "nul one two three four five six seven ocho nine".split(" ") | |
const isOdd = n=> NUMBERS[n % 10].indexOf("e")!=-1 | |
const isEven = n=> isOdd(n+1) |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Nest Test</title> | |
</head> | |
<body> | |
<h3>Sorted?</h3> | |
<script src="https://d3js.org/d3.v4.min.js"></script> |