irisjae / thiss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

thiss

Use this the way they use the Y combinator (you want arrow functions that need to use this?)

Brief API

var thiss = require ('thiss')

var node = {
  ...,
  attach_data: thiss (self => data => {
    ;self .data = data
  })
}

;node .attach_data ('x')
;console .log (node .data)
// x

(tbc)

About


Languages

Language:JavaScript 100.0%