Add missing console API methods to JS snippets

This commit adds snippets for the following console API methods that
were missing:

  - console.clear
  - console.dir
  - console.dirxml
  - console.groupCollapsed
  - console.info
  - console.profile
  - console.table

I left out console.debug and console.exception since they are simply
aliases for console.log and console.error.

Information about the console API can be found at:

  https://developers.google.com/chrome-developer-tools/docs/console-api
  https://developer.mozilla.org/en-US/docs/Web/API/console
This commit is contained in:
Joe Lencioni 2014-01-05 07:35:35 -08:00
parent b9cdc97ef9
commit bf0965fb6e

View File

@ -83,6 +83,18 @@ snippet ca "console.assert"
console.assert(${1:assertion}, ${2:"${3:message}"});
endsnippet
snippet cclear "console.clear"
console.clear();
endsnippet
snippet cdir "console.dir"
console.dir(${1:object});
endsnippet
snippet cdirx "console.dirxml"
console.dirxml(${1:object});
endsnippet
snippet ce "console.error"
console.error(${1:"${2:value}"});
endsnippet
@ -93,10 +105,30 @@ ${VISUAL}$0
console.groupEnd();
endsnippet
snippet cgroupc "console.groupCollapsed"
console.groupCollapsed("${1:label}");
${VISUAL}$0
console.groupEnd();
endsnippet
snippet ci "console.info"
console.info(${1:"${2:value}"});
endsnippet
snippet cl "console.log"
console.log(${1:"${2:value}"});
endsnippet
snippet cprof "console.profile"
console.profile("${1:label}");
${VISUAL}$0
console.profileEnd();
endsnippet
snippet ctable "console.table"
console.table(${1:"${2:value}"});
endsnippet
snippet ctime "console.time"
console.time("${1:label}");
${VISUAL}$0