Socket
Socket
Sign inDemoInstall

comment-unroll.js

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    comment-unroll.js

unroll table into code by template


Version published
Maintainers
1
Created

Readme

Source

comment-unroll.js

unroll table into code by template

simple usage

$npx comment-unroll src/path/to/your/code

expansion your format macro

import hoge from "fuga";

/*
# comment-unroll table
    type,message
    morning,good-morning
    evening,good-evening
    afternoon,good-afternoon
    wwwww,good-afternoon
# comment-unroll end
*/
switch(hoge) {
/*
# comment-unroll template
    case "${type}":
        console.log("${message}");
        break;
# comment-unroll end
*/
//# comment-unroll unroll
//# comment-unroll end
}
import hoge from "fuga";

/*
# comment-unroll table
    type,message
    morning,good-morning
    evening,good-evening
    afternoon,good-afternoon
    wwwww,good-afternoon
# comment-unroll end
*/
switch(hoge) {
/*
# comment-unroll template
    case "${type}":
        console.log("${message}");
        break;
# comment-unroll end
*/
//# comment-unroll unroll
    case "morning":
        console.log("good-morning");
        break;
    case "evening":
        console.log("good-evening");
        break;
    case "afternoon":
        console.log("good-afternoon");
        break;
    case "wwwww":
        console.log("good-afternoon");
        break;
//# comment-unroll end
}

macros

# comment-unroll table

  • let state table fetching mode until # comment-unroll end lines
# comment-unroll table
    RFC4180 format table
# comment-unroll end

# comment-unroll template

  • let state template fetching mode until # comment-unroll end lines
  • format follows varcom.js
# comment-unroll template
    varcom.js format text
# comment-unroll end

# comment-unroll unroll

  • overwrite between this and next # comment-unroll end by template
  • template applies all row of table
# comment-unroll unroll
    overrwrite txt. 
    do not type here if you need to save comments, codes, text etc...
# comment-unroll end

Keywords

FAQs

Last updated on 28 Mar 2022

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