batocera-ES-onArch

Emulationstation from batocera with configs and scripts for integration as Arch-Linux package

This project is maintained by GB609

/opt/batocera-emulationstation/node_modules/utils/data.js

Index

deepKeys

returns [HierarchicKey], one entry for each full path leading to a final none-object/none-array scalar

deepAssign

Assign given value at the subtree path designated by key key can be a string in ‘.’ hierarchy notation style or an array of string segments when it is a string, only basic splitting on ‘.’ is performed, so this does not work well with keys containing dots itself.

diff

Performs a deep comparison of 2 objects. Returns a deeply nested object structure which only contains those keys of obj2 NOT contained in obj1. Arrays are not treated specially for the comparison. Every index is used as “key”. The diff structure will not contain arrays, but a diff object that contains all index-based key entries where the arrays differed. which are NOT identical in obj1.

Example

obj1: { test: {x:42, y:"abc", w:88}, arr:[4,5,6] }
obj2: { test: {x:42, z:"abc", w:85}, arr:[4,8,6] }
result: { test: {z:"abc", w:85}, arr: {"1": 8} }

mergeObjects

Recursively merges object argument 2 (updates) into argument 1 (current). Merge rules:

Generated with shdoc from /opt/batocera-emulationstation/node_modules/utils/data.js