Call it via:
const flat = flatten( realDeepObject );
Test case:
/** | |
* The copy of the stateMachine.js for Visualizer (modified imports) | |
*/ | |
// Available variables: | |
// Machine (machine factory function) | |
// XState (all XState exports) | |
const settings = { | |
steps: 20, |
#!/bin/bash | |
# Check if the COMMIT_EDITMSG file exists (the case was found at GIT GUI) | |
if [ ! -f "$1" ]; then | |
exit | |
fi | |
# | |
# Inspects branch name and checks if it contains a Jira ticket number (i.e. ABC-123). | |
# If yes, commit message will be automatically prepended with [ABC-123]. |
git checkout main | |
git pull | |
git checkout <feature-branch> | |
git rebase -Xours master |
At the center is the domain layer. It is the entities and data that describe the subject area of the application, as well as the code to transform that data. The domain is the core that distinguishes one application from another.
You can think of the domain as something that won't change if we move from React to Angular, or if we change some use case. In the case of the store, these are products, orders, users, cart, and functions to update their data.
The data structure of domain entities and the essence of their transformations are independent from the outer world. External events trigger domain transformations, but do not determine how they will occur. >
import React from 'react' | |
import { observer } from 'mobx-react' | |
function ArtistList({ uiState: { artistData } }) { | |
const { data } = artistData; | |
if ( !data || !data.artists || !data.artists.length ) { | |
return <div>No artists bruh.</div> | |
} | |
const { artists } = data | |
return ( |