Skip to content

Interpret a string literal at the beginning of a function as its documentation.

Notifications You must be signed in to change notification settings

hackergrrl/docstrings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docstrings

Interpret a string literal at the beginning of a function as its documentation.

Usage

var doc = require('docstrings')

function foo () {
  "returns foo"
  return 'foo'
}

console.log(doc(foo))

This will output

returns foo

API

var doc = require('docstrings')

doc(func)

Returns a string matching the string literal at the beginning of a function. Matches "" and '' literals as well as template strings.

Install

With npm installed, run

$ npm install docstrings

Acknowledgments

docstrings was inspired by clojure's approach to documenting functions.

License

ISC

About

Interpret a string literal at the beginning of a function as its documentation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published