Socket
Socket
Sign inDemoInstall

@trivikr-test/property-provider

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trivikr-test/property-provider - npm Package Compare versions

Comparing version 3.170.0-es2016 to 3.170.0-es2017

21

dist-es/memoize.js

@@ -1,2 +0,1 @@

import { __awaiter } from "tslib";
export const memoize = (provider, isExpired, requiresRefresh) => {

@@ -7,3 +6,3 @@ let resolved;

let isConstant = false;
const coalesceProvider = () => __awaiter(void 0, void 0, void 0, function* () {
const coalesceProvider = async () => {
if (!pending) {

@@ -13,3 +12,3 @@ pending = provider();

try {
resolved = yield pending;
resolved = await pending;
hasResult = true;

@@ -22,14 +21,14 @@ isConstant = false;

return resolved;
});
};
if (isExpired === undefined) {
return (options) => __awaiter(void 0, void 0, void 0, function* () {
return async (options) => {
if (!hasResult || (options === null || options === void 0 ? void 0 : options.forceRefresh)) {
resolved = yield coalesceProvider();
resolved = await coalesceProvider();
}
return resolved;
});
};
}
return (options) => __awaiter(void 0, void 0, void 0, function* () {
return async (options) => {
if (!hasResult || (options === null || options === void 0 ? void 0 : options.forceRefresh)) {
resolved = yield coalesceProvider();
resolved = await coalesceProvider();
}

@@ -44,7 +43,7 @@ if (isConstant) {

if (isExpired(resolved)) {
yield coalesceProvider();
await coalesceProvider();
return resolved;
}
return resolved;
});
};
};
{
"name": "@trivikr-test/property-provider",
"version": "3.170.0-es2016",
"version": "3.170.0-es2017",
"scripts": {

@@ -23,3 +23,3 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",

"dependencies": {
"@trivikr-test/types": "3.170.0-es2016",
"@trivikr-test/types": "3.170.0-es2017",
"tslib": "^2.3.1"

@@ -26,0 +26,0 @@ },

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