Socket
Socket
Sign inDemoInstall

babel-plugin-transform-jsdoced

Package Overview
Dependencies
32
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-transform-jsdoced

It implements jsdoced javascript as a babel plugin


Version published
Weekly downloads
8
increased by700%
Maintainers
1
Install size
5.25 MB
Created
Weekly downloads
 

Changelog

Source

v1.2.4

  • removed silly debug log

Readme

Source

babel-plugin-transform-jsdoced

a babel plugin which use jsdoc to implement strong typing in javascript It implements the principle of jsdoced javascript as a babel plugin. It implements strong typing for functions in javascript. The type of the function arguments and of the return value are checked according to your jsdoc. It is working in browser and node.js. it has source maps.

On top of it it supports es6 arrow functions too! If you use react, don't worry it works with jsx without trouble.

Check it out!

What is JSDoced Javascript ?

Here is a Youtube video "JSDoced JS in 1min", it worth the whole minute :)

or in a single image

jsdoced javascript in a single image

Installation

$ npm install babel-plugin-transform-jsdoced

Usage

.babelrc

{
  "plugins": ["transform-jsdoced"]
}

With es6

{
  "presets": ["es2015"],
  "plugins": ["transform-jsdoced"]
}

Via CLI

$ babel --plugins transform-jsdoced script.js

With es6

$ babel --presets=es2015 --plugins transform-jsdoced ./sample-es6.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-jsdoced"]
});

Keywords

FAQs

Last updated on 23 Apr 2016

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