Published
Edited
Nov 11, 2020
Importers
1 star
Insert cell
Insert cell
definedTermSet = ({
"@type": "DefinedTermSet",
hasDefinedTerm: literals.map(([termCode, name]) => {
return {
"@type": "DefinedTerm",
termCode,
name
};
})
})
Insert cell
literals = [
["ADO", "ActiveX Data Objects"],
["ASP", "Active Server Pages"],
["CMS", "Content Management System"],
["CSS", "Cascading Style Sheets"],
["CVS", "Concurrent Versions System"],
["DevOps", "Software Development and IT Operations"],
["DMS", "Document Management System"],
["ERP", "Enterprise Resource Planning"],
["GTIN", "Global Trade Item Number"],
["HTML", "Hypertext Markup Language"],
["EF", "Entity Framework"],
["IDE", "Integrated Development Environment"],
["IE", "Internet Explorer"],
["ISE", "Integrated Scripting Environment"],
["ISBN", "International Standard Book Number"],
["JS", "JavaScript"],
["JSON-LD", "JavaScript Object Notation for Linked Data"],
["MIPS", "Microprocessor Without Interlocked Pipeline Stages"],
["MS", "Microsoft"],
["ORM", "Object Relational Mapping"],
["OS", "Operating System"],
["PHP", "PHP: Hypertext Preprocessor"],
["PLM", "Product Lifecycle Management"],
["PMS", "Project Management Software"],
["SCM", "Software Configuration Management"],
["SDK", "Software Development Kit"],
["SQL", "Structured Query Language"],
["SSMS", "SQL Server Management Studio"],
["SVG", "Scalable Vector Graphics"],
["SVN", "Subversion"],
["SWEB", "Schon wieder ein Betriebssystem"],
["TFVC", "Team Foundation Version Control"],
["TS", "TypeScript"],
["UI", "User Interface"],
["UML", "Unified Modeling Language"],
["URI", "Uniform Resource Identifier"],
["URL", "Uniform Resource Locator"],
["USSR", "Union of Soviet Socialist Republics"],
["UUID", "Universally Unique Identifier"], // aka GUID
["VB", "Visual Basic"],
["VS", "Visual Studio"],
["VBA", "Visual Basic for Applications"],
["WiX", "Windows Installer XML"],
["WPF", "Windows Presentation Foundation"],
["XAML", "Extensible Application Markup Language"],
["XML", "Extensible Markup Language"]
]
Insert cell
md`## Use Cases

In case you did not know, ${abbreviation("GTIN")}s identify trade items, including ${abbreviation("product")}s and services, using numeric identification codes.`
Insert cell
html`<style>
abbr[title] {
text-underline-position: under; /* 'auto' appears broken (Chrome) */
}
</style>`
Insert cell
abbreviation = (text) => {
const term = findTerm(text);
return term ? `<abbr title="${term.name}">${term.termCode}</abbr>` : text;
}
Insert cell
findTerm = (text, termSet = definedTermSet.hasDefinedTerm) =>
findTermByCode(text, termSet) ??
findTermByName(text, termSet)
Insert cell
findTermByCode = (code, termSet) =>
termSet.find(d => d.termCode.toUpperCase() === code.toUpperCase())
Insert cell
findTermByName = (name, termSet) =>
termSet.find(d => d.name.toUpperCase() === name.toUpperCase())
Insert cell
md`${descriptionList(["ISBN", "GTIN", "BOOYAH"])}`
Insert cell
descriptionList = (codes, termSet = definedTermSet.hasDefinedTerm) => {
let content = "<dl>";
const sortedCodes = codes.sort();
for (const code of sortedCodes) {
const term = findTermByCode(code, termSet);
if (term) {
content += `<dt>${term.termCode}</dt>`;
content += `<dd>${term.name}</dd>`;
}
}
content += "</dl>"
return content;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more