当前位置:网站首页>Chain length value
Chain length value
2022-07-03 08:00:00 【ange2017】
Share a chain long value function , Instead of optional chains .
// Chain length value
get(source, path, defaultValue = undefined) {
const paths = path.replace(/\[(\d+)\]/g, '.$1').split('.')
let result = source
for (const p of paths) {
result = Object(result)[p]
if (result === undefined) {
return defaultValue
}
}
return result
},边栏推荐
- Generate video using clipout in viz engine
- [step on the pit series] MySQL failed to modify the root password
- the installer has encountered an unexpected error installing this package
- RM delete file
- 多旅行商问题——公式和求解过程概述
- Pulitzer Prize in the field of information graphics - malofiej Award
- Transfinite hacker cognition
- Redis查看客户端连接
- Redis批量启停脚本
- Usage of (case, when) in PostgreSQL
猜你喜欢

My touch screen production "brief history" 1

Pat grade a 1027 colors in Mars

Ventuz Foundation Series "one step at the door"

The difference between hdmi2.1 and hdmi2.0 and the conversion of PD signals.

Technical dry goods Shengsi mindspire dynamic transformer with variable sequence length has been released!

Technical dry goods | Bert model for the migration of mindspore NLP model - text matching task (2): training and evaluation

the installer has encountered an unexpected error installing this package

一个实习生的CnosDB之旅
![[cocos creator] Click the button to switch the interface](/img/b8/f0fd54a2a197cbfd788990e2806b52.png)
[cocos creator] Click the button to switch the interface

LwIP learning socket (application)
随机推荐
Pat class a 1031 Hello world for u
The difference between hdmi2.1 and hdmi2.0 and the conversion of PD signals.
How can entrepreneurial teams implement agile testing to improve quality and efficiency? Voice network developer entrepreneurship lecture Vol.03
register关键字
haproxy+keepalived搭建01
YOLO系列 --- xml2txt脚本
华为交换机基础配置(telnet/ssh登录)
freetype库的移植
What is definition? What is a statement? What is the difference between them?
My touch screen production "brief history" 2
Getting started with minicom
Huawei s5700 switch initialization and configuration SSH and telnet remote login methods
Unity XR realizes interaction (grasping, moving, rotating, transmitting, shooting) -pico
P2704 [NOI2001] 炮兵阵地(状压dp)
MaxCompute字符串分割函数-SPLIT_PART
Microsoft Security Response Center
[cocos creator] get the resource UUID
An article for you to understand - Manchester code
PHP common sorting algorithm
What to do after the browser enters the URL