UNPKG

molstar

Version:

A comprehensive macromolecular library.

23 lines (22 loc) 670 B
/** * Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info. * * from https://github.com/dsehnal/CIFTools.js * @author David Sehnal <david.sehnal@gmail.com> */ var ShortStringPool; (function (ShortStringPool) { function create() { return Object.create(null); } ShortStringPool.create = create; function get(pool, str) { if (str.length > 6) return str; const value = pool[str]; if (value !== void 0) return value; pool[str] = str; return str; } ShortStringPool.get = get; })(ShortStringPool || (ShortStringPool = {})); export { ShortStringPool };