index.js 755 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * Utility with info on URL attributes.
  3. *
  4. * ## What is this?
  5. *
  6. * This package contains info on attributes that have URLs as values.
  7. *
  8. * ## When should I use this?
  9. *
  10. * You can use this package any time you’re rewriting URLs.
  11. *
  12. * ## Use
  13. *
  14. * ```js
  15. * import {urlAttributes} from 'html-url-attributes'
  16. *
  17. * console.log(urlAttributes.formAction)
  18. * //=> ['button', 'input']
  19. * console.log(urlAttributes.href)
  20. * //=> ['a', 'area', 'base', 'link']
  21. * ```
  22. *
  23. * ## API
  24. *
  25. * ### `urlAttributes`
  26. *
  27. * HTML URL properties (`Record<string, Array<string> | null>`).
  28. *
  29. * Each key is a property name and each value is a list of tag names it applies
  30. * to or `null` if it applies to all elements.
  31. */
  32. export {urlAttributes} from './lib/index.js'