UNPKG
@surveycake/utils
Version:
latest (2.12.6)
2.12.6
2.12.5
2.12.4
2.12.0
2.11.0
2.10.2
2.10.1
2.10.0
2.9.2
2.9.1
2.9.0
2.8.0
2.7.2
2.7.1
2.7.0
2.6.13
2.6.11
2.6.10
2.6.9
2.6.8
2.6.6
2.6.5
2.6.4
2.6.3
2.6.2
2.6.1
2.6.0
2.5.0
2.4.1
2.4.0
2.3.2
2.3.1
2.3.0
2.2.0
2.0.2
2.0.1
1.4.0
1.3.0
1.3.0-alpha.0
1.2.0
1.1.5
1.1.3
1.1.2
1.1.1
1.1.0
1.0.0
SurveyCake Javascript Utils
@surveycake/utils
/
dist
/
insertItemWithoutDuplicated.d.ts
10 lines
(9 loc)
•
273 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** *
@module
helper.array */
/** * Insert data into source and check data is not duplicated. *
@param
finder
*
@see
removeItem
*/
export
declare
function
insertItemWithoutDuplicated<T>(
source
: T[],
data
: T,
finder
?:
(
data
: T
) =>
(
item
: T
) =>
boolean
): T[];