MCPcopy
hub / github.com/DevCloudFE/ng-devui / slice

Method slice

devui/dragdrop/shared/utils.ts:78–96  ·  view source on GitHub ↗
(args, slice?, sliceEnd?)

Source from the content-addressed store, hash-verified

76 }
77
78 public static slice(args, slice?, sliceEnd?) {
79 const ret = [];
80 let len = args.length;
81
82 if (len === 0) {
83 return ret;
84 }
85
86 const start = slice < 0 ? Math.max(0, slice + len) : slice || 0;
87
88 if (sliceEnd !== undefined) {
89 len = sliceEnd < 0 ? sliceEnd + len : sliceEnd;
90 }
91
92 while (len-- > start) {
93 ret[len - start] = args[len];
94 }
95 return ret;
96 }
97
98 // 动态添加styles
99 public static addElStyles(el: any, styles: any) {

Callers 15

ngOnInitMethod · 0.80
sass-handler.jsFile · 0.80
progressingMethod · 0.80
getAsyncDataMethod · 0.80
unshiftStringFunction · 0.80
rotateLabelMethod · 0.80
findSortableElMethod · 0.80
insertPlaceholderMethod · 0.80
checkSelfFromIndexMethod · 0.80
handelPathMethod · 0.80
prefixZeroMethod · 0.80
onCollapseMethod · 0.80

Calls 1

maxMethod · 0.80

Tested by 8

ngOnInitMethod · 0.64
changePageContentMethod · 0.64
filterChangeMultipleMethod · 0.64
resolveMonthFunction · 0.64
testNgModelAndYearMonthFunction · 0.64
resolveMonthFunction · 0.64
testNgModelAndYearMonthFunction · 0.64