Socket
Socket
Sign inDemoInstall

emdee

Package Overview
Dependencies
7
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    emdee

Inline README's for repl goodness


Version published
Weekly downloads
875
decreased by-26.41%
Maintainers
1
Install size
347 kB
Created
Weekly downloads
 

Readme

Source

emdee

Inline README's for repl goodness.

npm install emdee --save

Create a README in source.

var obj = {};

obj.README = function() {/*
    <br/>
    ## Sneaky way to do free text accessable in source

    You'll **notice** this is *markdown*

    [can't click](http://in/the/console/tho...)

*/}

// Run emdee conversion.

var emdee = require('emdee');

emdee(obj, {
  paths: [
    'README'
    // 'nested/deeper/README',
    // 'myObjectInstance/myFunction' // use with suffix
  ],
  // suffix: '.README'
});

The obj.README function has now been converted to a property and will render the markdown to console upon accessing.


repl> obj.README

Options:

Paths

  • Array of object paths. Each should point directly to a readme function as outlined above.

Suffix

  • Creates path/to/function.README' if suffix = '.README'` (nests with first .)
  • The suffix, if present, applies to all paths.
  • __Note that although the suffix supports nesting a readme onto a function, the parser that converts the function into a readme assumes the function is always exactly like this:
function() {/*

    ### readme body

    In other words, a much cleverer parser needs to be made.

    One that can pick out the comments from among the code.

    And other stuff.

    This is a rabbit hole.

    Make magic...

    p.s. The parser is exported, you can change it before calling emdee()

    p.s. If this leads you to making something awesome, please let me know, 
         i might like to use it.


    ### why does it use '/' instead of '.' as the path delimiter?

    It's a hint://

*/}

FAQs

Last updated on 08 Sep 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc