Skip to content

Instantly share code, notes, and snippets.

@odyss009
Created September 22, 2017 12:26
Show Gist options
  • Save odyss009/cddd35d63451c6339efbf6b904214ab3 to your computer and use it in GitHub Desktop.
Save odyss009/cddd35d63451c6339efbf6b904214ab3 to your computer and use it in GitHub Desktop.

Revisions

  1. odyss009 created this gist Sep 22, 2017.
    10 changes: 10 additions & 0 deletions indent.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    //indent rule
    return Promise.all(keys.map(key => scan(key)))
    .then(result => [].concat(...result))
    .then(expireKeys.bind(null, client));

    //beauiful
    return Promise.all(keys.map(key => scan(key)))
    .then(result => [].concat(...result))
    .then(expireKeys.bind(null, client));