victorb/trymodule

Allow for default session values to be specified

開放

#12 建立於 2016年3月23日

 (1 則留言) (1 個反應) (0 位負責人)JavaScript (31 個分叉)github user discovery
enhancementhelp wanted

倉庫指標

星標
 (1,133 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

So I had the same idea for this module a while ago (great job btw!) and one of the things I wanted to do was allow for packages to allow a default session, meaning they could pre-define a few variables in their package.json file or somewhere else and that JSON would also be attached to the global object in the REPL section.

So say you have something like selectn and you want to test it. Instead of having to manually type in dummy data the package manager could add something to their package.json (or something) like:

...
"try": {
  "addresses":  [
  {"first": "blah blah blah"},
  {"second": "blah blah blah" }
 ]
}

And that would be parsed and loaded in just like the module itself.

貢獻者指南