fix: ensure makeMap calls are tree-shakable

This commit is contained in:
Evan You
2019-10-15 12:19:46 -04:00
parent 58fffcb987
commit 7de3aee317
4 changed files with 10 additions and 9 deletions

View File

@@ -1,7 +1,8 @@
/**
* Make a map and return a function for checking if a key
* is in that map.
*/
// Make a map and return a function for checking if a key
// is in that map.
//
// IMPORTANT: all calls of this function must be prefixed with /*@__PURE__*/
// So that rollup can tree-shake them if necessary.
export function makeMap(
str: string,
expectsLowerCase?: boolean