转转代码片段
欢迎使用👏👏👏!
🐻 支持语言
- vue (.vue)
- JavaScript (.js)
- JavaScript React (.jsx)
- TypeScript (.ts)
- TypeScript React (.tsx)
BASE
trigger |
snippet(JS) |
nippet(TS) |
zcd |
console.dir(value) |
console.dir(value) |
zcl |
console.log(message) |
console.log(message) |
zctb |
console.table(tabularData) |
console.table(tabularData) |
zct |
console.time(label) |
console.time(label) |
zcte |
console.timeEnd(label) |
console.timeEnd(label) |
zcw |
console.warn(message) |
console.warn(message) |
Array
trigger |
snippet(JS) |
nippet(TS) |
zaf |
Array.from(arrayLike, mapFn) |
Array.from(arrayLike, mapFn) |
zaia |
Array.isArray(value) |
Array.isArray(value) |
zao |
Array.of(items) |
Array.of(items) |
.concat |
.concat(items) |
.concat(items) |
.copyWithin |
.copyWithin(target, start, end) |
.copyWithin(target, start, end) |
.entries |
.entries() |
.entries() |
.every |
.every((value, index, array) => {}) |
.every((value, index, array) => {}) |
.fill |
.fill(target, start, end) |
.fill(target, start, end) |
.filter |
.filter((value, index, array) => {}) |
.filter((value, index, array) => {}) |
.find |
.find((value, index, array) => {}) |
.find((value, index, array) => {}) |
.findIndex |
.findIndex((value, index, array) => {}) |
.findIndex((value, index, array) => {}) |
.flat |
.flat(depth) |
.flat(depth) |
.flatMap |
.flatMap((value, index, array) => {}) |
.flatMap((value, index, array) => {}) |
.forEach |
.forEach((value, index, array) => {}) |
.forEach((value, index, array) => {}) |
.includes |
.includes(searchElement, fromIndex) |
.includes(searchElement, fromIndex) |
.indexOf |
.indexOf(searchElement, fromIndex) |
.indexOf(searchElement, fromIndex) |
.join |
.join(separator) |
.join(separator) |
.keys |
.keys() |
.keys() |
.lastIndexOf |
.lastIndexOf(searchElement, fromIndex) |
.lastIndexOf(searchElement, fromIndex) |
.map |
.map((value, index, array) => {}) |
.map((value, index, array) => {}) |
.pop |
.pop() |
.pop() |
.push |
.push(value) |
.push(value) |
.reduce |
.reduce((previousValue, currentValue, currentIndex, array) => {}, initialValue) |
.reduce((previousValue, currentValue, currentIndex, array) => {}, initialValue) |
.reduceRight |
.reduceRight((previousValue, currentValue, currentIndex, array) => {}, initialValue) |
.reduceRight((previousValue, currentValue, currentIndex, array) => {}, initialValue) |
.reverse |
.reverse() |
.reverse() |
.slice |
.slice(start, end) |
.slice(start, end) |
.some |
.some((value, index, array) => {}) |
.some((value, index, array) => {}) |
.sort |
.sort((a, b) => {}) |
.sort((a, b) => {}) |
.unshift |
.unshift(value) |
.unshift(value) |
.values |
.values() |
.values() |
| |