Skip to content

Commit

Permalink
Added a very interesting TODO in the rabbit "hole"
Browse files Browse the repository at this point in the history
  • Loading branch information
WebReflection committed Jan 5, 2024
1 parent bc0a0ee commit 53a663c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion esm/literals.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const entry = (t, p, u, n = '') => ({ t, p, u, n });
* @param {Cache[]} s the cache stack
* @returns {Cache}
*/
export const cache = s => ({ s, t: null, n: null, d: empty});
export const cache = s => ({ s, a: false, t: null, n: null, d: empty});

/**
* @typedef {Object} Parsed
Expand Down
6 changes: 6 additions & 0 deletions esm/rabbit.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ export const unroll = (cache, { s: svg, t: template, v: values }) => {
return cache.n;
};

// TODO: check twice for isArray or check attributes
// makes literally no sense and it's performance
// critical. The template details know all of this
// so there's gonna be a way to drill those details
// down this loop, avoiding any unnecessary check.

/**
* @param {Cache} cache
* @param {any[]} values
Expand Down
2 changes: 1 addition & 1 deletion signal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 53a663c

Please sign in to comment.