🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@farjs/filelist

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@farjs/filelist - npm Package Compare versions

Comparing version
0.6.1
to
0.6.2
+1
-1
package.json
{
"name": "@farjs/filelist",
"author": "viktor-podzigun",
"version": "0.6.1",
"version": "0.6.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "description": "Common plugin/api/ui for FAR.js File Browser module",

@@ -33,4 +33,23 @@ /**

/**
* @template T
* @param {() => T} fn
* @return {() => T}
*/
export function lazyFn(fn) {
function lazyFunc() {
if (!lazyFunc._value) {
lazyFunc._value = fn();
}
return lazyFunc._value;
}
/** @type {T | undefined} */
lazyFunc._value = undefined;
return lazyFunc;
}
const sizeFormatter = new Intl.NumberFormat("en-EN", {
maximumFractionDigits: 0,
});

@@ -19,1 +19,7 @@ /**

export function formatSize(size: number): string;
/**
* @template T
* @param {() => T} fn
* @return {() => T}
*/
export function lazyFn<T>(fn: () => T): () => T;