@files-stack/client-core
Advanced tools
Comparing version 0.0.27-1 to 0.0.27-2
export * from './logger'; | ||
export * from './helpers'; |
@@ -78,3 +78,3 @@ module.exports = | ||
__export(__webpack_require__(1)); | ||
__export(__webpack_require__(4)); | ||
__export(__webpack_require__(6)); | ||
@@ -93,2 +93,3 @@ | ||
__export(__webpack_require__(2)); | ||
__export(__webpack_require__(4)); | ||
@@ -120,2 +121,46 @@ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ramda_1 = __webpack_require__(5); | ||
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 editorHistory = editorWrappers[index].history || []; | ||
const history = ramda_1.filter(item => item !== resource, editorHistory); | ||
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 ''; | ||
}; | ||
/***/ }), | ||
/* 5 */ | ||
/***/ (function(module, exports) { | ||
module.exports = require("ramda"); | ||
/***/ }), | ||
/* 6 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
function __export(m) { | ||
@@ -125,7 +170,7 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(__webpack_require__(5)); | ||
__export(__webpack_require__(7)); | ||
/***/ }), | ||
/* 5 */ | ||
/* 7 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -132,0 +177,0 @@ |
{ | ||
"name": "@files-stack/client-core", | ||
"version": "0.0.27-1", | ||
"version": "0.0.27-2", | ||
"description": "xterm server services for Node", | ||
@@ -51,3 +51,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@files-stack/utils": "^0.0.27-1", | ||
"@files-stack/utils": "^0.0.27-2", | ||
"cross-env": "^5.1.3", | ||
@@ -59,3 +59,3 @@ "jest": "^22.1.0", | ||
"dependencies": { | ||
"@files-stack/core": "^0.0.27-1" | ||
"@files-stack/core": "^0.0.27-2" | ||
}, | ||
@@ -62,0 +62,0 @@ "typings": "lib/index.d.ts", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27505
12
331
Updated@files-stack/core@^0.0.27-2