steelbrain / tagged-template-literals

A base library to make your packages simpler.
MIT License
2 stars 0 forks source link

Can i have the npm package name? #9

Open frank-dspeed opened 4 years ago

frank-dspeed commented 4 years ago

Hello i am Frank Lemanschik i would love to take over your npm package name tagged-template-literals for my project tag-template-literals

Its a collection with helpers and examples how to use tagged-template-literals with composition and reuse.

i will also reExport and keep your taggedTemplateLiterals function if you like else i would deprecate it as we offer a more intuitiv way of doing escapeHTML via tag-html

import { html, escapeHTML }  from 'tag-html';
const template = dangerous => html`Hello there <div>
    ${escapeHTML(dangerous)}
  </div>`;
console.log(template('<script></script>') === `Hello there <div>
    &lt;script&gt;&lt;/script&gt;
  </div>`)

my npm user name is frank-dspeed if you want to transfer ownership thanks in advance.

steelbrain commented 4 years ago

Hi @frank-dspeed

Thank you for the request. Can you please elaborate as to why having this specific name would be beneficial for your project instead of any other available name?

Thanks

frank-dspeed commented 4 years ago

@steelbrain as it illustrates general use of tagged template literals with standard methods and patterns to work with them it would get found more easy when searching for tagged template literals but i will go with tagged-template-strings if you don't aggree that could also work great but it is less commun then tagged-template-litterals

frank-dspeed commented 4 years ago

it exposes for example a helper function that you can use to get a array of arrays to reduce.

/**
 * Tagged Template Literal returns Template
 * @param {Array<String>} strArr 
 * @param {...*} valArr
 * @returns {Array<Array>} Array with 2 Arrays first with Strings secund Values any
 */
export const tagArgsToArray = (strArr, ...valArr) => [strArr, valArr]