Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-memo

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-memo - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

49

dist-node/index.js

@@ -5,40 +5,2 @@ 'use strict';

function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArrayLimit(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
class LinkedMapCache {

@@ -144,3 +106,5 @@ constructor() {

removeLatterlyUsed() {
const maxSize = this.options.maxSize;
const {
maxSize
} = this.options;
const itemsToRemove = this.map.size - maxSize + 1;

@@ -152,6 +116,5 @@

for (let i = 0; i < itemsToRemove; i++) {
const _entries$next = entries.next(),
_entries$next$value = _slicedToArray(_entries$next.value, 1),
key = _entries$next$value[0];
const {
value: [key]
} = entries.next();
this.clear(key);

@@ -158,0 +121,0 @@ }

2

package.json
{
"name": "create-memo",
"description": "Memoization utils for JavaScript",
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "esnext": "dist-src/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc