Socket
Socket
Sign inDemoInstall

@files-stack/core

Package Overview
Dependencies
Maintainers
1
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@files-stack/core - npm Package Compare versions

Comparing version 0.0.26-7 to 0.0.26-8

32

lib/index.js

@@ -397,2 +397,5 @@ module.exports =

});
const sorter = ramda_1.sortBy(ramda_1.compose(ramda_1.toLower, ramda_1.prop('name')));
files = sorter(files);
directories = sorter(directories);
return directories.concat(files);

@@ -419,3 +422,3 @@ };

}
return arr2.every((a2, i) => (arr1[i] && arr1[i] == a2));
return arr2.every((a2, i) => (arr1[i] && arr1[i] === a2));
};

@@ -425,2 +428,29 @@ exports.getFileExt = name => {

};
exports.addEditorHistory = (editorWrappers, editorId, resource) => {
const index = ramda_1.findIndex(ramda_1.propEq('editorId', editorId))(editorWrappers);
if (index !== -1) {
let history = editorWrappers[index].history || [];
history = ramda_1.filter(item => item !== resource, history);
editorWrappers[index].history = [...history, resource];
}
return [...editorWrappers];
};
exports.removeEditorHistory = (editorWrappers, editorId, resource) => {
const index = ramda_1.findIndex(ramda_1.propEq('editorId', editorId))(editorWrappers);
if (index !== -1) {
const history = ramda_1.filter(item => item !== resource, editorWrappers[index].history);
editorWrappers[index].history = history;
}
return [...editorWrappers];
};
exports.getLastEditorHistory = (editorWrappers, editorId) => {
const index = ramda_1.findIndex(ramda_1.propEq('editorId', editorId))(editorWrappers);
if (index !== -1) {
const history = editorWrappers[index].history;
if (history.length) {
return history[history.length - 1];
}
}
return '';
};

@@ -427,0 +457,0 @@

@@ -11,1 +11,4 @@ import { ICoreFileStat } from './interfaces';

export declare const getFileExt: (name: any) => any;
export declare const addEditorHistory: (editorWrappers: any, editorId: any, resource: any) => any[];
export declare const removeEditorHistory: (editorWrappers: any, editorId: any, resource: any) => any[];
export declare const getLastEditorHistory: (editorWrappers: any, editorId: any) => any;

2

package.json
{
"name": "@files-stack/core",
"version": "0.0.26-7",
"version": "0.0.26-8",
"description": "files core for higher packages to depend on",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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