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
/* ------------------------------------------ | |
Pick in object | |
--------------------------------------------- */ | |
const peek = (...keep) => iter => keep.indexOf(iter) > -1; | |
const split = c => c.split('.'); | |
const tail = array => { | |
const [head, ...result] = array; // eslint-disable-line | |
return result; | |
}; |
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
/* ------------------------------------------ | |
DataCollection | |
--------------------------------------------- */ | |
class DataCollection { | |
constructor(v) { | |
this.value = v || [] | |
} | |
override(v) { | |
this.value = v.slice(0) | |
} |
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
{ | |
"primitives": { | |
"$description": "A group of primitive values", | |
"hexadecimalRed": { | |
"$type": "hexadecimalColorString", | |
"$value": "#9B1C0C" | |
}, | |
"aZeroToOneNumber": { | |
"$type": "zeroToOneNumber", | |
"$value": 0.3 |
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
# EffectTS Code Style Guidelines | |
## Import Style | |
- Use named imports with curly braces: `import { Effect, Console, Duration } from "effect"` | |
- Import the `pipe` utility from the main "effect" package | |
- Import platform-specific modules from their respective packages: `import { NodeRuntime } from "@effect/platform-node"` | |
- Group related imports together (e.g., keep all Effect imports in one statement) | |
## Code Structure and Organization | |
- Prefer generator syntax using `Effect.gen` for sequential operations |
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
class Foo extends React.Component{ | |
constructor( props ){ | |
super( props ); | |
this.handleClick = this.handleClick.bind(this); | |
} | |
handleClick(event){ | |
// your event handling logic | |
} |