Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eof

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eof

The best project ever.

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

eof

Build Status Build Status

Extract template from multi-line comment inside function body.

I use it in tests when you don't want to make templates outside of the test. So it looks more readable than an array of strings or multi-line strings (I believe in it) and simple then outside file.

Enjoy testing!

Getting Started

Install the module with: npm install eof

  var eof = require('eof');
  eof.extract(function() {
    /*
      Hello World
    */
  });

Examples

Extract simple text template

  var eof = require('eof');
  eof.extract(function() {
    /*
      Hello World
    */
  });

Extract javascript template. And format it throught js-beautify

  var eof = require('eof');
  eof.extract(function() {
    /*
        var max = function() {
            return Math.max.apply(null, arguments);
        };
    */
  }).format('javascript');

You can look at test directory for live example

License

Copyright (c) 2013 Maksim Ryzhikov
Licensed under the MIT license.

Keywords

FAQs

Package last updated on 29 Sep 2013

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc