How to use the html-tags.includes function in html-tags

To help you get started, we’ve selected a few html-tags 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 nitin42 / animate-components / packages / animate-components / containers / HOC.js View on Github external
as: function(props, propName) {
      const prop = props[propName];
      const err = `Warning: '${prop}' passed to '${ComposedComponent}' component is not a valid html tag.`;
      /* eslint-disable no-console */
      return checkTag.includes(prop) ? null : console.error(err);
    },
    forceInterpolate: PropTypes.objectOf((propValue, key) => {
github nitin42 / animate-components / src / containers / merge.js View on Github external
as: function (props, propName) {
    const prop = props[propName];
    const err = `Warning: '${prop}' passed to 'Merge' component is not a valid html tag.`;
    /* eslint-disable no-console */
    return checkTag.includes(prop) ? null : console.error(err);
  },
  component: PropTypes.func,
github nitin42 / animate-components / src / containers / HOC.js View on Github external
as: function (props, propName) {
      const prop = props[propName];
      const err = `Warning: '${prop}' passed to '${ComposedComponent}' component is not a valid html tag.`;
      /* eslint-disable no-console */
      return checkTag.includes(prop) ? null : console.error(err);
    },
    forceInterpolate: PropTypes.objectOf((propValue, key) => {
github nitin42 / animate-components / packages / animate-components / containers / merge.js View on Github external
as: function(props, propName) {
    const prop = props[propName];
    const err = `Warning: '${prop}' passed to 'Merge' component is not a valid html tag.`;
    /* eslint-disable no-console */
    return checkTag.includes(prop) ? null : console.error(err);
  },
  component: PropTypes.func
github nitin42 / stylus-in-react / src / stylesheet.js View on Github external
function getStylesheet(rules, root) {
  if (!domElements.includes(root)) {
    return {};
  }

  let arr = [];

  arr.push(
    ...getRules(rules, root),
    ...supportRules(rules, root),
    ...mediaRules(rules, root),
  );
  
  return arr;
}
github nitin42 / stylus-in-react / src / utils / stylesheet.js View on Github external
function getStylesheet(rules, root) {
  if (!domElements.includes(root)) {
    return {}
  }

  const arr = []

  arr.push(
    ...getRules(rules, root),
    ...supportRules(rules, root),
    ...mediaRules(rules, root)
  )
  return arr
}
github gridsome / gridsome / packages / vue-remark / lib / sfcSyntax.js View on Github external
function tokenizeVueComponents (eat, value) {
  value = getValue(value)

  if (isTag(value)) {
    const [, name] = value.match(/^<\/?([\w-]+)[>\s]/) || []

    if (name && !htmlTags.includes(name)) {
      return eat(value)({ type: 'html', value })
    }
  }
}
github siddharthkp / markedup / src / transforms / variables.js View on Github external
let transform = (content, data) => {
    let re = /<(.*?)>/g;
    let matches = content.match(re);

    if (!matches) return content;
    for (let match of matches) {
        let variable = match.substring(1).substring(0, match.length - 2);
        if (!htmlTags.includes(variable) && getData(data, variable)) {
            content = content.replace(match, getData(data, variable));
        }
    }
    return content;
};
github One-Nexus / Synergy / src / js / component.jsx View on Github external
constructor(props, context) {
        super(props, context);

        this.config = context.config || {};
        this.tag = props.component || props.tag || (HTMLTags.includes(props.name) ? props.name : 'div');
        this.module = props.module || context.module;
        this.propModifiers = renderModifiers(getModifiersFromProps(props, Synergy.CssClassProps));
        this.contextModifiers = renderModifiers(getModifiersFromProps(context.props && context.props[props.name], Synergy.CssClassProps));
        this.passedModifiers = renderModifiers(props.modifiers);
        this.modifiers = this.propModifiers + this.passedModifiers + this.contextModifiers;
        this.classes = getModuleFromProps(props, props.className ? ' ' + props.className : '');
        this.selector = `${this.module}_${props.name + this.modifiers}${this.classes}`.replace(/,/g, '_');

        this.getEventHandlers([
            props, this.config[props.name] ? this.config[props.name] : {}
        ]);

        if (props.href) this.tag = 'a';
    }
github One-Nexus / Synergy / src / js / module.jsx View on Github external
constructor(props, context) {
        super(props, context);

        increment++;

        this.tag = props.component || props.tag || (HTMLTags.includes(props.name) ? props.name : 'div');
        this.propModifiers = renderModifiers(getModifiersFromProps(props, Synergy.CssClassProps));
        this.passedModifiers = renderModifiers(props.modifiers);
        this.modifiers = this.propModifiers + this.passedModifiers;
        this.classes = props.className ? ' ' + props.className : '';
        this.classNames = getModuleFromProps(props, props.name + this.modifiers + this.classes);
        this.id = (props.before || props.after) && !props.id ? `synergy-module-${increment}` : props.id;
        this.ref = node => refHandler(node, props);

        if (Synergy.CssClassProps) Synergy.CssClassProps.forEach(prop => {
            if (Object.keys(props).includes(prop)) {
                this.classNames = this.classNames + ' ' + prop
            }
        });
    }

html-tags

List of standard HTML tags

MIT
Latest version published 6 months ago

Package Health Score

76 / 100
Full package analysis