1.0.8 • Published 1 year ago

displace-comments v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

displace-comments

提取文本中的注释,并将注释替换为等价的空格

支持的注释

  • html注释
  • JavaScript单行、多行注释和注解

安装

npm i displace-comments

使用

interface IdisplaceComments{
  (code:string,m?:{
    start: string;
    end: string | RegExp;
    type?: "single" | "multiple" | "html" | "custom";
  }):{
    strippedCode: string;
    detail: DetailItem[];
  }
}
import displaceComments from 'displace-comments'
const code = ''
displaceComments(code[,options])

示例

见test.js的执行结果

License

MIT

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.0

1 year ago

0.0.0

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago