New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@axelarjs/utils

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axelarjs/utils - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

10

build/commonjs/function.d.ts
export { default as throttle } from "lodash.throttle";
export { default as debounce } from "lodash.debounce";
type FN<T, R> = (arg: T) => R;
/**
* Memoize a function
*
* memoized function will cache the result of the function call
*
* @param func function to memoize
* @returns memoized function
*/
export declare function memoize<T, R>(func: FN<T, R>): FN<T, R>;

23

build/commonjs/function.js

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.debounce = exports.throttle = void 0;
exports.memoize = exports.debounce = exports.throttle = void 0;
var lodash_throttle_1 = require("lodash.throttle");

@@ -12,1 +12,22 @@ Object.defineProperty(exports, "throttle", { enumerable: true, get: function () { return __importDefault(lodash_throttle_1).default; } });

Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return __importDefault(lodash_debounce_1).default; } });
/**
* Memoize a function
*
* memoized function will cache the result of the function call
*
* @param func function to memoize
* @returns memoized function
*/
function memoize(func) {
const cache = new Map();
return (arg) => {
const cachedResult = cache.get(arg);
if (cachedResult !== undefined) {
return cachedResult;
}
const result = func(arg);
cache.set(arg, result);
return result;
};
}
exports.memoize = memoize;
export { default as throttle } from "lodash.throttle";
export { default as debounce } from "lodash.debounce";
type FN<T, R> = (arg: T) => R;
/**
* Memoize a function
*
* memoized function will cache the result of the function call
*
* @param func function to memoize
* @returns memoized function
*/
export declare function memoize<T, R>(func: FN<T, R>): FN<T, R>;
export { default as throttle } from "lodash.throttle";
export { default as debounce } from "lodash.debounce";
/**
* Memoize a function
*
* memoized function will cache the result of the function call
*
* @param func function to memoize
* @returns memoized function
*/
export function memoize(func) {
const cache = new Map();
return (arg) => {
const cachedResult = cache.get(arg);
if (cachedResult !== undefined) {
return cachedResult;
}
const result = func(arg);
cache.set(arg, result);
return result;
};
}
export { default as throttle } from "lodash.throttle";
export { default as debounce } from "lodash.debounce";
type FN<T, R> = (arg: T) => R;
/**
* Memoize a function
*
* memoized function will cache the result of the function call
*
* @param func function to memoize
* @returns memoized function
*/
export declare function memoize<T, R>(func: FN<T, R>): FN<T, R>;

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.debounce = exports.throttle = void 0;
exports.memoize = exports.debounce = exports.throttle = void 0;
var lodash_throttle_1 = require("lodash.throttle");

@@ -12,1 +12,22 @@ Object.defineProperty(exports, "throttle", { enumerable: true, get: function () { return __importDefault(lodash_throttle_1).default; } });

Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return __importDefault(lodash_debounce_1).default; } });
/**
* Memoize a function
*
* memoized function will cache the result of the function call
*
* @param func function to memoize
* @returns memoized function
*/
function memoize(func) {
const cache = new Map();
return (arg) => {
const cachedResult = cache.get(arg);
if (cachedResult !== undefined) {
return cachedResult;
}
const result = func(arg);
cache.set(arg, result);
return result;
};
}
exports.memoize = memoize;

10

package.json
{
"name": "@axelarjs/utils",
"version": "0.1.3",
"version": "0.1.4",
"publishConfig": {

@@ -62,4 +62,4 @@ "access": "public"

"@types/ramda": "^0.29.4",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"@types/testing-library__jest-dom": "^5.14.9",

@@ -76,4 +76,4 @@ "@vitejs/plugin-react": "^4.0.4",

"vite": "4.4.9",
"vitest": "^0.34.4",
"@axelarjs/config": "0.1.3"
"vitest": "^0.34.5",
"@axelarjs/config": "0.1.4"
},

@@ -80,0 +80,0 @@ "dependencies": {

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