bit-docs-js/process/code module

Process a line of code to add properties on a DocObject.

processCode(options, callback)

Parameters

  1. options {ProcessCodeOptions}:

    Options object that includes the TagBlock and any line of code that immediately followed the block.

  2. callback {ProcessorCallback(newDoc, newScope)}:

    Callback to call with the new DocObject.

Use

processCode({
    code: "foo: function(){"
  },
  function(newDoc) {
    newDoc.type //-> "function"
  }
)