Skip to content

Instantly share code, notes, and snippets.


Jos de Jong josdejong

View GitHub Profile
josdejong / merge.kt
Last active Aug 13, 2020
Merge two data classes in Kotlin
View merge.kt
import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.full.primaryConstructor
* Merge two data classes
* The resulting data class will contain:
* - all fields of `other` which are non null
* - the fields of `this` for the fields which are null in `other`
josdejong / package.json
Last active Aug 29, 2015
Test ES7 async/await
View package.json
"name": "es7_async",
"version": "0.0.1",
"description": "",
"license": "ISC",
"dependencies": {
"asyncawait": "^0.7.4",
"babel-core": "^5.4.4",
"babel-plugin-typecheck": "0.0.3"
josdejong / gist:4537647
Last active Jun 2, 2016
String interpolation method for underscore.js.
View gist:4537647
String interpolation method for underscore.js
var props = {
first: 'Jos',
last: 'de Jong'
var message = _.interpolate('Hello $first $last, welcome!', props);
You can’t perform that action at this time.