Created
July 19, 2022 15:08
-
-
Save EmpeRoar/c04e964718c5cc9f988b30cdd426b089 to your computer and use it in GitHub Desktop.
scan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private scanner(data: any, select: string, d = null) { | |
if(data && select) { | |
const pointer = select.split('.'); | |
while(data && pointer.length) { | |
const x = pointer.shift(); | |
if(x) { | |
data = data[x]; | |
} | |
} | |
return data; | |
} | |
return d; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment