Guest User

Untitled

a guest
Jun 25th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. function h(){
  2. const texts = []
  3. const rec = (strs, ...values) => {
  4. if(strs.length === 1 && strs[0] === ""){
  5. return texts.join("`")
  6. }else{
  7. texts.push(String.raw(strs, ...values))
  8. return rec
  9. }
  10. }
  11. return rec
  12. }
  13.  
  14.  
  15. function here(strs, ...values){
  16. const texts = []
  17. texts.push(String.raw(strs, ...values))
  18. const rec = (strs, ...values) => {
  19. if(!strs){
  20. return texts.join("`")
  21. }else{
  22. texts.push(String.raw(strs, ...values))
  23. return rec
  24. }
  25. }
  26. return rec
  27. }
Add Comment
Please, Sign In to add comment