- Toughts and doubts
- Reactivity
Current implementationComponent based implementation
- displayName
package ; | |
using TypeCheck; | |
/** | |
* @author Porfirio | |
*/ | |
class Main { | |
public function new() {} | |
static function main() { | |
var m = new Main(); |
package ; | |
import haxe.macro.Compiler; | |
import haxe.macro.Context; | |
import haxe.macro.Type; | |
import haxe.macro.Expr; | |
import haxe.macro.JSGenApi; | |
using haxe.macro.Tools; | |
using Lambda; | |
using StringTools; |
license: mit |
import { PreactContext, JSX, Component } from 'preact'; | |
export * from './store'; | |
type FC<P> = (props: P) => JSX.Element; | |
type createComponentFN<P> = (c: Component<P>) => FC<P>; | |
/** | |
* Wraps a FunctionalComponent to be handled with the composition api | |
* @param fn | |
*/ |
const skywatchRE = /SKYWATCH_(PL_PS|S2_MS)_(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})/; | |
const entries = []; | |
for await (const dirEntry of Deno.readDir(".")) { | |
const match = dirEntry.name.match(skywatchRE); | |
if (match) { | |
const sat = match[1]; | |
const date = `${match[2]}-${match[3]}-${match[4]}T${match[5]}-${match[6]}`; | |
const renamed = `${date}_SKYWATCH_${sat}.tif`; |
function getOrSet<K, V>(map: Map<K, V>, key: K, defaultValue: () => V): V { | |
const value = map.get(key); | |
if (value == null) { | |
const answer = defaultValue(); | |
map.set(key, answer); | |
return answer; | |
} else { | |
return value; | |
} | |
} |