How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • var ansiHTML = require('ansi-html');
    var str = ansiHTML('[ANSI_TEXT]');
    Docs
  • ansiHTML.reset();
    Docs
  • var chalk = require('chalk');
     
    var str = chalk.bold.red('foo') + ' bar';
    console.log('[ANSI]', str)
    console.log('[HTML]', ansiHTML(str));
    Docs
  •  {
          HtmlWebpackPlugin.getHooks(compilation).alterAssetTagGroups.tapAsync('HtmlWebpackPluginTest', (htmlPluginData, callback) => {
            config.externals.forEach((e) => {
              const tag = {
                innerHTML: fs.readFileSync(path.resolve(workingDirectory, e)).toString('utf8')
              }
              if (path.extname(e) === '.js') {
                htmlPluginData.headTags.push(Object.assign(tag, {
                  tagName: 'script',
                  closeTag: true,
                  attributes: {
                    type: 'text/javascript'
                  }
                }))
              }
              if (path.extname(e) === '.css') {
                htmlPluginData.headTags.push(Object.assign(tag, {
                  tagName: 'style',
                  closeTag: true,
                  attributes: {
                    type: 'text/css'
                  }
                }))
              }
            })
    
            callback(null, htmlPluginData)
          })
        }
    /gabrielcsapo/tryitout MIT
  • import ansiEscapes from 'ansi-escapes';
    
    // Moves the cursor two rows up and to the left
    process.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft);
    //=> '\u001B[2A\u001B[1000D'
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples