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

  • function outputStyle(str) {
        if (str) {
            return chalk.gray(" → ") + chalk.underline.bold.gray(str);
        }
        return '';
    }
    
    
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">function</span> <span class="token function">outputStyle</span><span class="token punctuation">(</span><span class="token parameter">str<span class="token operator">:</span> any</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">string</span></code></pre>
    /NewFuture/miniprogram-build mit
    0
  • stream = through.obj(function (file, enc, cb) {
        
        //...
    log.info(colors.gray('Linting file ' + file.path));
        bootlint.lintHtml(file.contents.toString(), reporter, options.disabledIds);
    
        
    
        //...
    }, function (cb) {
        
        //...
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token punctuation">(</span>local <span class="token keyword">var</span><span class="token punctuation">)</span> stream<span class="token operator">:</span> <span class="token builtin">any</span></code></pre>
    /tschortsch/gulp-bootlint mit
    0
  • function deprecate(title, alternative, description) {
        message(title, alternative, description);
        console.log('  ' + colors.gray('More information: ' + colors.underline('http://dev.ivogabe.com/gulp-typescript-3/')));
    }
    
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">function</span> <span class="token function">deprecate</span><span class="token punctuation">(</span><span class="token parameter">title<span class="token operator">:</span> any<span class="token punctuation">,</span> alternative<span class="token operator">:</span> any<span class="token punctuation">,</span> description<span class="token operator">:</span> any</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword">void</span></code></pre>
    /ivogabe/gulp-typescript mit
    0
  • async update(name, content) {
        const fileName = this.getFileName(name);
        try {
          const result = await this.client.put(fileName, content);
          if (+result.res.statusCode === 200) {
            log(colors.green(`${fileName}上传成功!`));
          } else {
            log(colors.red(`${fileName}上传失败!`));
          }
        } catch (error) {
          log(colors.red(`${fileName}上传失败!`));
        }
      }
    
      
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token punctuation">(</span>method<span class="token punctuation">)</span> AliOSS<span class="token punctuation">.</span><span class="token function">update</span><span class="token punctuation">(</span>name<span class="token operator">:</span> <span class="token builtin">any</span><span class="token punctuation">,</span> content<span class="token operator">:</span> <span class="token builtin">any</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">Promise</span><span class="token operator">&lt;</span><span class="token keyword">void</span><span class="token operator">></span></code></pre>
    /vbigbang/webpack-oss MIT
    0
  • function appAndPluginWatch(done) {
    
      log(colors.green('Watching source files...'));
    
      // Licenses
      gulp.watch(paths.license_md, () => appLicense());
    
      // App
      gulp.watch(paths.sass, () => appSass());
      gulp.watch(paths.templatecache, () => appNgTemplate());
      gulp.watch(paths.ng_annotate, (event) => appNgAnnotate(event));
      gulp.watch(paths.ng_translate, () => appNgTranslate());
      
      //...
    }
    
    
    
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">function</span> <span class="token function">appAndPluginWatch</span><span class="token punctuation">(</span><span class="token parameter">done<span class="token operator">:</span> any</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword">void</span></code></pre>
    /duniter/cesium agpl-3.0
    0
  • function initTask() {
      
      //...
    log(colors.green("Generating default Nucleum project files"));
      log(
        colors.yellow(`
        To start the dev server run:
      `),
        colors.magenta(`
        yarn dev
      `)
      );
    
      
    
      //...
    }
    
    
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">function</span> <span class="token function">initTask</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">:</span> internal<span class="token punctuation">.</span>PassThrough <span class="token keyword">module</span> initTask</code></pre>
    /CosAnca/nucleum MIT
    0
  • const c = require('ansi-colors');
     
    console.log(c.red('This is a red string!'));
    console.log(c.green('This is a red string!'));
    console.log(c.cyan('This is a cyan string!'));
    console.log(c.yellow('This is a yellow string!'));
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">import</span> c</code></pre>
    Docs
    0
  • console.log(c.unstyle(c.blue.bold('foo bar baz')));
    //=> 'foo bar baz'
    //=> 'foo bar baz'
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">var</span> <span class="token builtin">console</span><span class="token operator">:</span> Console</code></pre>
    Docs
    0
  • const colors = require('ansi-colors');
     
    colors.theme({
      danger: colors.red,
      dark: colors.dim.gray,
      disabled: colors.gray,
      em: colors.italic,
      heading: colors.bold.underline,
      info: colors.cyan,
      muted: colors.dim,
      primary: colors.blue,
      strong: colors.bold,
      success: colors.green,
      underline: colors.underline,
      warning: colors.yellow
    });
     
    // Now, we can use our custom styles alongside the built-in styles!
    // Now, we can use our custom styles alongside the built-in styles!
    console.log(colors.danger.strong.em('Error!'));
    console.log(colors.warning('Heads up!'));
    console.log(colors.info('Did you know...'));
    console.log(colors.success.bold('It worked!'));
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">import</span> colors</code></pre>
    Docs
    0
  • const colors = require('ansi-colors');
     
    colors.theme({
      danger: colors.red,
      dark: colors.dim.gray,
      disabled: colors.gray,
      em: colors.italic,
      heading: colors.bold.underline,
      info: colors.cyan,
      muted: colors.dim,
      primary: colors.blue,
      strong: colors.bold,
      success: colors.green,
      underline: colors.underline,
      warning: colors.yellow
    });
     
    // Now, we can use our custom styles alongside the built-in styles!
    // Now, we can use our custom styles alongside the built-in styles!
    console.log(colors.danger.strong.em('Error!'));
    console.log(colors.warning('Heads up!'));
    console.log(colors.info('Did you know...'));
    console.log(colors.success.bold('It worked!'));
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">import</span> colors</code></pre>
    Docs
    0
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples