I have published this as an open source website, please check it out here:
-
Web Site URL: https://alshdavid.github.io/commbank-statement-converter
-
Source Code: https://alshdavid.github.io/commbank-statement-converter
class Subject { | |
constructor() { | |
this.subscribers = {} | |
this.resolveComplete | |
this.completePromise = new Promise(res => this.resolveComplete = res) | |
this.hasComplete = false | |
} | |
toPromise() { | |
return this.completePromise |
ROKT_DEBUG_KEY.placementInit({ | |
"placement": { | |
"id": "6588", | |
"display": { | |
"targetElementSelector": "#rokt-placeholder" | |
}, | |
"slots": [ | |
{ | |
"instanceGuid": "87339108-e107-430b-9dad-e33c32e2b1bc", | |
"offer": { |
I have published this as an open source website, please check it out here:
Web Site URL: https://alshdavid.github.io/commbank-statement-converter
Source Code: https://alshdavid.github.io/commbank-statement-converter
<script> | |
import { getContext } from 'svelte' | |
console.log(getContext('test')) // Foobar | |
</script> |
import { Component, Initializer } from '@angular/core' | |
import { MyPipe } from './pipes' | |
import { AnotherComponent } from './components' | |
@Component({ | |
selector: 'my-component', | |
declarations: [ | |
MyPipe, | |
AnotherComponent | |
], |
class HTTPClient { | |
async get(url: string) { | |
return 'An HTTP Request!' | |
} | |
} | |
export default new HTTPClient() |
import state from 'reallystate' | |
import immer from "immer" | |
import { Item } from './item' | |
export class Collection { | |
items = state.createCollection<Item[]>({ | |
store: this.store, | |
collectionName: "posts", | |
defaultProcessor: immer, | |
initialValue: [] |
import { BehaviorSubject } from 'rxjs' // 3kb | |
export class Collection { | |
items = new BehaviorSubject<Item[]>([]) | |
subscribe = this.items.subscribe.bind(this.items) | |
getValue() { | |
return this.items.getValue() | |
} | |
export class Collection { | |
items: Item[] = [] | |
watchers = [] | |
subscribe(cb: (value: Item[]) => void) { | |
this.watchers.push(cb) | |
cb(this.items) | |
return () => this.watchers.filter(sub => sub !== cb) | |
} | |
export class Item { | |
constructor( | |
public id: string, | |
public date: Date, | |
public title: string, | |
) {} | |
} | |
export class Collection { | |
items: Item[] = [] |