lovelope

Results 3 comments of lovelope

# 源码 ```js const fn = (value, radix = 1) => Array.from(new Array(value.length / radix)).reduce( (al, _, idx) => [...al, value.slice(0, radix * (idx + 1))], [] ); ``` #...

> I don't know if this is the correct/best way to do it, but it's at least a workaround. Here's a sample `.stylelintrc` which "fixes" the problem: > > ```json...

> 一个不考虑其他数据类型的公共方法,基本满足大部分场景 > > ```js > function deepCopy(target, cache = new Set()) { > if (typeof target !== 'object' || cache.has(target)) { > return target > } > if (Array.isArray(target))...