Created
August 24, 2013 02:14
-
-
Save simianhacker/6325644 to your computer and use it in GitHub Desktop.
This snippet will convert `req` to `var SomeName = require('some_name');`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snippet req "Require a module where it converts CamelCase to underscore (camel_case)" !b | |
var ${1:name} = require(${2:'${3:${1/(^[A-Z])|([A-Z])/(?2:_\l$2:\l$1)/g}}'}); | |
endsnippet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment