“ state.triggeredTests =”之后的下划线是什么意思:
mutations: {
setTriggeredTest(state, data) {
state.triggeredTests = _
.chain(data)
.forEach((item) => {
item.dateFormatted = moment(item.date).format('DD MMMM YYYY');
item.explanationTest = testMapping.get(item.test);
})
// .sortedUniqBy('explanationTest')
.orderBy('date')
.groupBy('date')
.value();
},
答案 0 :(得分:3)
它是一个功能/实用程序/帮助程序库,通常可以是lodash或underscore
答案 1 :(得分:3)
usr/bin/python3 install numpy
是JS中完全有效的标识符。 underscore库及其克隆通常将_
全局变量用作命名空间。
P.S。:_
也是有效的标识符,jQuery或类似的库正在使用它。