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

anno

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

anno

A parser for embedded annotations of functions and modules

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

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

Anno

A parser for embedded annotations of functions and modules

Build Status Coverage Status Dependency Status Dependency Status

Anno parses DocBlocks, ignores any regular comment, and returns an object containing the parsed annotations.

Installation

npm install anno --save-dev

Usage

/**
 * This function does something.
 * @hello world
 * @valueless
 */
function doSomething () {
  console.log('Did something.');
}
var anno = require('anno');
var result = anno(fs.readFileSync('test.js', 'utf8'));
  console.log(result);
});
{
  "doSomething": {
    "hello": "world",
    "valueless": true
  }
}

Supported syntax

  • function <name> (…) { … }
  • var <name> = function (…) { … }
  • let <name> = function (…) { … }
  • const <name> = function (…) { … }
  • var <name> = new Function (…)
  • let <name> = new Function (…)
  • const <name> = new Function (…)
  • var <name> = (…) => { … }
  • let <name> = (…) => { … }
  • const <name> = (…) => { … }
  • module.exports = function (…) { … }
  • exports.<name> = function (…) { … }
  • exports[<name>] = function (…) { … }

Changelog

  • 0.0.2
    • README fixes
  • 0.0.1
    • Initial version

License

Copyright (c) 2016 Thomas Rasshofer
Licensed under the MIT license.

See LICENSE for more info.

Keywords

FAQs

Package last updated on 23 Mar 2016

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