UNPKG
@ams-team/ams
Version:
latest (0.34.5)
0.34.5
0.33.0
0.32.3
0.32.2
0.32.1
0.32.0
0.31.3
0.28.0
0.27.9
0.27.0
0.25.33
0.25.32
0.25.31
0.25.30
0.25.29
0.25.28
0.25.17
0.25.7
0.24.16
0.24.0
0.22.9
0.21.1
0.20.5
0.20.2
0.19.3
0.18.4
0.17.11
0.17.4
0.15.11
0.15.6
0.13.0
0.9.0
Admin Materials System.
github.com/vipshop/ams/
vipshop/ams
@ams-team/ams
/
src
/
utils
/
list.js
12 lines
(11 loc)
•
298 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
export
function
listStringHasValue
(
list, value
) {
return
list &&
String
(list).
split
(
','
).
indexOf
(value) >=
0
; }
export
function
listRemoveItem
(
list, item
) {
if
(list) {
const
index = list.
indexOf
(item);
if
(index > -
1
) { list.
splice
(index,
1
); } } }