mithril
Version:
A framework for building brilliant applications
13 lines (10 loc) • 547 B
JavaScript
var emptyAttrs = require("./emptyAttrs")
// This Map manages the following:
// - Whether an attrs is cached attrs generated by compileSelector().
// - Whether the cached attrs is "static", i.e., does not contain any form attributes.
// These information will be useful to skip updating attrs in render().
//
// Since the attrs used as keys in this map are not released from the selectorCache object,
// there is no risk of memory leaks. Therefore, Map is used here instead of WeakMap.
module.exports = new Map([[emptyAttrs, true]])