Skip to content

Commit

Permalink
build: Use standard Object.keys().size.
Browse files Browse the repository at this point in the history
This is part of #1132.
  • Loading branch information
manthey committed Jan 3, 2022
1 parent 5fa69fd commit f7a021e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ var transform = function (options) {
if (!(this instanceof transform)) {
options = options || {};
if (!(options.source in transformCache)) {
if (Object.size(transformCache) >= maxTransformCacheSize) {
if (Object.keys(transformCache).length >= maxTransformCacheSize) {
transformCache = {};
}
transformCache[options.source] = {};
}
if (!(options.target in transformCache[options.source])) {
if (Object.size(transformCache[options.source]) >= maxTransformCacheSize) {
if (Object.keys(transformCache[options.source]).length >= maxTransformCacheSize) {
transformCache[options.source] = {};
}
transformCache[options.source][options.target] = new transform(options);
Expand Down

0 comments on commit f7a021e

Please sign in to comment.