Server IP : 66.29.132.122 / Your IP : 3.133.121.241 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules/qw/ |
Upload File : |
# qw Quoted word literals! ```js const qw = require('qw') const myword = qw` this is a long list of words` // equiv of: const myword = [ 'this', 'is', 'a', 'long', 'list', 'of', 'words' ] ``` You can embed vars in the usual way: ```js const mywords = qw`product ${23 * 5} also ${'escaping a string'}` // equiv of: const mywords = [ 'product', 23 * 5, 'also', 'escaping a string' ] ``` You can also embed vars inside strings: ```js const mywords = qw`product=${23 * 5} also "${'escaping a string'}"` // equiv of: const mywords = [ 'product=' + (23 * 5), 'also', '"escaping a string"' ] ``` ## DESCRIPTION This uses template strings to bring over this little common convenience from Perl-land.