OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
main
/
ts
/
util
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 05:44:43 AM
rwxr-xr-x
📄
ArrUtils.ts
2.39 KB
02/20/2020 05:44:46 AM
rw-r--r--
📄
LazyEvaluator.ts
547 bytes
02/20/2020 05:44:46 AM
rw-r--r--
📄
Predicate.ts
770 bytes
02/20/2020 05:44:47 AM
rw-r--r--
📄
Private.ts
1.15 KB
02/20/2020 05:44:47 AM
rw-r--r--
📄
Quirks.ts
26.03 KB
02/20/2020 05:44:48 AM
rw-r--r--
📄
Uuid.ts
667 bytes
02/20/2020 05:44:48 AM
rw-r--r--
Editing: Private.ts
Close
/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ */ import Uuid from './Uuid'; /** * This module lets you create private properties on objects. * * @class tinymce.util.Private * @private */ const fieldName = Uuid.uuid('private'); const set = function (publicKey, privateKey) { return function (obj, value) { if (!obj[fieldName]) { obj[fieldName] = {}; } obj[fieldName][publicKey] = function (key) { return key === privateKey ? value : null; }; }; }; const getOr = function (publicKey, privateKey) { return function (obj, defaultValue) { const collection = obj[fieldName]; const accessor = collection ? collection[publicKey] : null; return accessor ? accessor(privateKey) : defaultValue; }; }; const create = function () { const publicKey = Uuid.uuid('pu'); const privateKey = Uuid.uuid('pr'); return { getOr: getOr(publicKey, privateKey), set: set(publicKey, privateKey) }; }; export default { create };