How to use the OrderedMap function from immutable
Find comprehensive JavaScript immutable.OrderedMap code examples handpicked from public code repositorys.
282 283 284 285 286 287 288 289 290 291
this.monitorBlockInfo = {}; /** * Ordered map of all monitors, which are MonitorReporter objects. */ this._monitorState = OrderedMap({}); /** * Monitor state from last tick */
36
11
7
+ 41 other calls in file
GitHub: 52black/scratch-vm
2012 2013 2014 2015 2016 2017 2018 2019 2020 2021
if (target.isOriginal) target.deleteMonitors(); }); this.targets.map(this.disposeTarget, this); // tw: explicitly emit a MONITORS_UPDATE instead of relying on implicit behavior of _step() const emptyMonitorState = OrderedMap({}); if (!emptyMonitorState.equals(this._monitorState)) { this._monitorState = emptyMonitorState; this.emit(Runtime.MONITORS_UPDATE, this._monitorState); }
3
6
1
+ 5 other calls in file
GitHub: otpusk/apisearch-toolbox
182 183 184 185 186 187 188 189 190 191 192
return new _immutable.OrderedMap(_objectSpread({}, DEFAULTS)).merge(params); } function createSearchQuery() { var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var searchQuery = new _immutable.OrderedMap(_objectSpread(_objectSpread({}, DEFAULTS), DEFAULTS_SEARCH)).mergeDeep(params); return searchQuery; } /** * Create search result bones
0
3
4
+ 11 other calls in file
598 599 600 601 602 603 604 605 606 607
new Map([[[1], new Map([[[1], 'two']])]]), ], [Immutable.Map({a: 0}), Immutable.Map({b: 0})], [Immutable.Map({v: 1}), Immutable.Map({v: 2})], [ Immutable.OrderedMap().set(1, 'one').set(2, 'two'), Immutable.OrderedMap().set(2, 'two').set(1, 'one'), ], [ Immutable.Map({1: Immutable.Map({2: {a: 99}})}),
0
1
4
+ 79 other calls in file
GitHub: DFFR-NT/dffrnt.utils
355 356 357 358 359 360 361 362 363 364
try { var P = Object.keys(args), K = Object.keys(defs), R = {}, D = {}, V = {}, A = {}; // --- P.map((ke, y) => { var ky = K[y]; if (!!ky) { R[ky] = args[y]; D[ky] = defs[ky]; } }); // --- V = Imm.OrderedMap(D).mergeDeepWith((p, n) => { switch (true) { case p instanceof Function: return p(n); default: return n === undefined || n === null ? p : n; }
0
1
2
+ 21 other calls in file
GitHub: ethical-jobs/redux
1357 1358 1359 1360 1361 1362 1363 1364 1365 1366
* @param {List} * @param {Collection} * @return OrderedMap */ function createOrderedMap(keys, items) { return Immutable.OrderedMap(keys.map(function (key) { return [key.toString(), items.get(key.toString())]; })); }
1
0
2
363 364 365 366 367 368 369 370 371 372
new Map([[[1], new Map([[[1], 'two']])]]), ], [Immutable.Map({a: 0}), Immutable.Map({b: 0})], [Immutable.Map({v: 1}), Immutable.Map({v: 2})], [ Immutable.OrderedMap() .set(1, 'one') .set(2, 'two'), Immutable.OrderedMap() .set(2, 'two')
1
0
0
+ 3 other calls in file
74 75 76 77 78 79 80 81 82 83
hasFocus: true }); var blockMap = BlockMapBuilder.createFromArray(BLOCKS); var contentState = new ContentState({ blockMap: blockMap, entityMap: Immutable.OrderedMap(), selectionBefore: selectionState, selectionAfter: selectionState }).createEntity({ type: 'IMAGE',
0
0
0
39 40 41 42 43 44 45 46 47 48 49
var List = Immutable.List, Record = Immutable.Record, Repeat = Immutable.Repeat, ImmutableMap = Immutable.Map, OrderedMap = Immutable.OrderedMap; var defaultRecord = { entityMap: null, blockMap: null, selectionBefore: null,
0
0
0
immutable.Map is the most popular function in immutable (1575 examples)