How to use the unquote function in unquote

To help you get started, we’ve selected a few unquote examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github probablyup / markdown-to-jsx / index.js View on Github external
? attributes.reduce(function(map, raw, index) {
          const delimiterIdx = raw.indexOf('=');

          if (delimiterIdx !== -1) {
            const key = normalizeAttributeKey(
              raw.slice(0, delimiterIdx)
            ).trim();
            const value = unquote(raw.slice(delimiterIdx + 1).trim());

            const mappedKey = ATTRIBUTE_TO_JSX_PROP_MAP[key] || key;
            const normalizedValue = (map[
              mappedKey
            ] = attributeValueToJSXPropValue(key, value));

            if (
              HTML_BLOCK_ELEMENT_R.test(normalizedValue) ||
              HTML_SELF_CLOSING_ELEMENT_R.test(normalizedValue)
            ) {
              map[mappedKey] = React.cloneElement(
                compile(normalizedValue.trim()),
                { key: index }
              );
            }
          } else {

unquote

Remove wrapping quotes from a string.

MIT
Latest version published 7 years ago

Package Health Score

65 / 100
Full package analysis

Popular unquote functions