I hereby claim:
- I am dantman on github.
- I am dantman (https://keybase.io/dantman) on keybase.
- I have a public key ASC7jATCYRenYm-biehrUI-OGVElMbPiszWhH5-jXsJ6jQo
To claim this, I am signing this object:
{ | |
"presets": [ | |
[ | |
"@babel/preset-env", | |
{ | |
"targets": { | |
"node": 8 | |
} | |
} | |
] |
{ | |
"presets": [ | |
[ | |
"@babel/preset-env", | |
{ | |
"modules": "commonjs" | |
} | |
] | |
] | |
} |
@memoize | |
export default function myExpensiveFunction(data) { | |
// do something expensive | |
return result; | |
} |
import {PureComponent} from 'react'; | |
export default class AnchorRef extends PureComponent { | |
state = { | |
ref: undefined, | |
}; | |
_setRef = ref => { | |
this.setState({ref}); | |
}; |
module.exports = function (file, api, options) { | |
const j = api.jscodeshift; // alias the jscodeshift API | |
const root = j(file.source); // parse JS code into an AST | |
let mutation = false; | |
const isJSXIdentifier = (node, name) => j.JSXIdentifier.check(node) && node.name === name; | |
// Remove the opening and closing element names if they are Fragment or React.Fragment | |
const update = node => { |
<span class=""><span class="pl-k" style="box-sizing:border-box;color:#d73a49;" >export</span> <span class="pl-k" style="box-sizing:border-box;color:#d73a49;" >const</span> <span class="pl-c1" style="box-sizing:border-box;color:#005cc5;" >styles</span> <span class="pl-k" style="box-sizing:border-box;color:#d73a49;" >=</span> <span class="pl-smi" style="box-sizing:border-box;color:#24292e;" >theme</span> <span class="pl-k" style="box-sizing:border-box;color:#d73a49;" >=></span> ({</span><br> | |
<span class=""> root<span class="pl-k" style="box-sizing:border-box;color:#d73a49;" >:</span> {</span><br> | |
<span class="yes" style="background-color:#81A594;" > display<span class="pl-k" style="box-sizing:border-box;color:#d73a49;" >:</span> <span class="pl-s" style="box-sizing:border-box;color:#032f62;" ><span class="pl-pds" style="box-sizing:border-box;color:#032f62;" >'</span>flex<span class="pl-pds" style="box-sizing:border-box;color:#032f62;" >'</span></span>,</span><br> | |
<span class="yes" style |
I hereby claim:
To claim this, I am signing this object:
using VRUB; | |
[ExposedClass] | |
class PersistentStore : ExposedClass { // base class could use a different name | |
Dictionary<string, string> _temporaryStore = new Dictionary<string, string>(); | |
Dictionary<string, string> _persistentStore = new Dictionary<string, string>(); | |
[ExposedMethod] | |
public string Get(string key, bool temporary = false) { |