String Raw
Installation
npm install string-raw --save
Usage
It behaves just as String.raw.
const stringRaw = ; const arg1 = 'foo';const arg2 = 'bar'; stringRaw``; // ""stringRaw`hoge`; // "hoge"stringRaw`hoge`; // "hogefoo"stringRaw`hogefuga`; // hogefoofugabarstringRaw`hogefugapiyo`; // hogefoofugabarpiyo ; // ""; // "hoge"; // "hogefoofuga"; // "hogefoofugabarpiyo" ; // ""; // "" ; // TypeError: Cannot convert undefined or null to object; // TypeError: Cannot convert undefined or null to object; // TypeError: Cannot convert undefined or null to object; // TypeError: Cannot convert undefined or null to object
Development
Requirement global
- NodeJS v5.10.0
- Npm v3.8.3
git clone https://github.com/59naga/string-rawcd string-rawnpm install npm test