{"size": 1282, "ext": "js", "max_stars_repo_path": "src/platforms/web/compiler/util.js", "max_stars_repo_name": "FearlessMa/learn-vue", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/platforms/web/compiler/util.js", "max_issues_repo_name": "FearlessMa/learn-vue", "max_issues_repo_issues_event_min_datetime": "2021-05-09T01:07:09.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T09:16:38.000Z", "max_forks_repo_path": "src/platforms/web/compiler/util.js", "max_forks_repo_name": "FearlessMa/learn-vue", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 33.7368421053, "max_line_length": 84, "alphanum_fraction": 0.6840873635}
/* @flow */

import { makeMap } from 'shared/util'

// export function makeMap (
//   str: string,
//   expectsLowerCase?: boolean
// ): (key: string) => true | void {
//   const map = Object.create(null)
//   const list: Array<string> = str.split(',')
//   for (let i = 0; i < list.length; i++) {
//     map[list[i]] = true
//   }
//   return expectsLowerCase
//     ? val => map[val.toLowerCase()]
//     : val => map[val]
// }
export const isUnaryTag = makeMap(
  'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  'link,meta,param,source,track,wbr'
)

// Elements that you can, intentionally, leave open
// (and which close themselves)
export const canBeLeftOpenTag = makeMap(
  'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
)

// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
export const isNonPhrasingTag = makeMap(
  'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  'title,tr,track'
)
