New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

class-annotations

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-annotations

A reader annotations from class write with ES6 syntax

  • 0.2.1
  • Source
  • npm
  • Socket score

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

class-annotations

use a reader of annotations for class write with ES6 syntax , with easy use.

auto persist the data type of all the natives type

can read multiples class inner single file

  • npm install class-annotations --save
  • yarn add class-annotations

foo.js

/**
 * @Route( { name: "foo" , path: "/foo" , exactPath: true , methods=['GET'] } )
 * @Another = 35
 *
 * should be an excludes values
 *
 * @Another2: "hello"
 */
class Foo {

    constructor() {

        // ...
        // ...
    }

    // ...

} ;

app.js


const createClassAnnotations = require('class-annotations') ;

const ClassAnnotations = createClassAnnotations( __dirname ) ;

const annotations = new ClassAnnotations('./foo.js') ;

console.log( annotations ) ;

output log of annotations:

{
    classCount: 1 ,

    readers: {

        Foo: {
            data: {
                exludes: ['','should be an excludes values','']
                Route: {
                    name: { valueBrut: "foo", value: "foo" } ,
                    path: { valueBrut: "/foo" , value: "/foo" } ,
                    exactPath: { valueBrut: "true" , value: true } ,
                    methods: { valueBrut: "['GET']" , value: [ 'GET' ] }
                } ,
                Another: {
                    valueBrut: "35" ,
                    value: 35
                } ,
                Another2: {
                    valueBrut: "hello" ,
                    value: "hello"
                }
            } ,
            classname: "Foo"
        }
    }
}
  • npm install class-annotations --save
  • yarn add class-annotations
If you have detect an bug or anormal behavior with ClassAnnotaions please remote a issues on github

Keywords

FAQs

Package last updated on 31 Mar 2020

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