How to use the leasot.isExtSupported function in leasot

To help you get started, we’ve selected a few leasot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mikeerickson / todo-webpack-plugin / index.js View on Github external
testFiles.forEach(file => {
    // skip source files from node_modules
    if (file.match(/node_modules/g)) {

    if (options.skipUnsupported) {
      if (!leasot.isExtSupported(path.extname(file))) {

    const todo = leasot.parse({
      ext: path.extname(file),
      content: fs.readFileSync(file, 'utf8'),
      fileName: file,
      customTags: options.tags,
      reporter: options.reporter,
      withInlineFiles: options.withInlineFiles
    todos = todos.concat(todo);
github sivakumar-kailasam / broccoli-leasot / src / index.js View on Github external
processString(content, relativePath) {
		if (this.enabled) {
			const fileExtension = path.extname(relativePath);
			if (leasot.isExtSupported(fileExtension)) {
					ext: fileExtension, 
					content: content, 
					fileName: relativePath, 
					customTags: this.kinds
			} else {
		return content;


Parse and output TODOs and FIXMEs from comments in your files

Latest version published 5 months ago

Package Health Score

76 / 100
Full package analysis