Skip to content

Commit

Permalink
Add pure annotations in more places to help with tree shaking minifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
rpetrich committed May 26, 2019
1 parent 900d216 commit 7b56b77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpers.js
Expand Up @@ -162,7 +162,7 @@ export function _forOwn(target, body, check) {
return _forTo(keys, function(i) { return body(keys[i]); }, check);
}

export const _iteratorSymbol = typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
export const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";

// Asynchronously iterate through an object's values
// Uses for...of if the runtime supports it, otherwise iterates until length on a copy
Expand Down Expand Up @@ -223,7 +223,7 @@ export function _forOf(target, body, check) {
return _forTo(values, function(i) { return body(values[i]); }, check);
}

export const _asyncIteratorSymbol = typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
export const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";

// Asynchronously iterate on a value using it's async iterator if present, or its synchronous iterator if missing
export function _forAwaitOf(target, body, check) {
Expand Down Expand Up @@ -610,7 +610,7 @@ export function _empty() {
}

// Sentinel value for early returns in generators
export const _earlyReturn = {};
export const _earlyReturn = /*#__PURE__*/ {};

// Asynchronously call a function and send errors to recovery continuation, skipping early returns
export function _catchInGenerator(body, recover) {
Expand Down

0 comments on commit 7b56b77

Please sign in to comment.