Skip to content

Commit

Permalink
Minify status entry in browser.ts. Fix #94
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed May 23, 2018
1 parent 4d045d0 commit 46508d9
Show file tree
Hide file tree
Showing 3 changed files with 490 additions and 466 deletions.
14 changes: 13 additions & 1 deletion build/mdn-data-importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,23 @@ function buildPropertiesWithMDNData(vscProperties) {
*/
function extractMDNProperties(mdnEntry) {
return {
status: mdnEntry.status,
status: abbreviateStatus(mdnEntry.status),
syntax: mdnEntry.syntax
}
}

/**
* Make syntax as small as possible for browser usage
*/
function abbreviateStatus(status) {
return {
standard: 's',
nonstandard: 'n',
experimental: 'e',
obsolete: 'o'
}[status];
}

module.exports = {
buildPropertiesWithMDNData
}
Loading

0 comments on commit 46508d9

Please sign in to comment.