@itentialopensource/remove-duplicates-from-array-of-numbers-or-strings
Version:
[Deprecated] Removes duplicates from an array of numbers or an array of strings
123 lines • 2.24 kB
JSON
{
"_id": "5f1e1e7f655a0306dde634b2",
"name": "removeDuplicates-NonObjects",
"incoming": [
{
"$id": "array",
"type": "array",
"items": {
"type": [
"boolean",
"number",
"integer",
"string",
"null"
]
}
}
],
"outgoing": [
{
"$id": "uniqueArray",
"type": "array",
"items": {
"type": [
"boolean",
"number",
"integer",
"string",
"null"
]
}
}
],
"steps": [
{
"id": 2,
"type": "assign",
"from": {
"location": "incoming",
"name": "array",
"ptr": ""
},
"to": {
"location": "declaration",
"name": 1,
"ptr": "/args/0/value"
}
},
{
"id": 1,
"type": "declaration",
"library": "Set",
"method": "new Set",
"args": [
null
],
"view": {
"row": 1,
"col": 1
},
"summary": "Converting to Set removes duplicates"
},
{
"id": 4,
"type": "assign",
"from": {
"location": "declaration",
"name": 1,
"ptr": "/return"
},
"to": {
"location": "method",
"name": 3,
"ptr": "/args/0/value"
}
},
{
"id": 3,
"type": "method",
"library": "Array",
"method": "from",
"args": [
null
],
"view": {
"row": 1,
"col": 2
},
"summary": "Convert Set back to Array"
},
{
"id": 5,
"type": "assign",
"from": {
"location": "method",
"name": 3,
"ptr": "/return"
},
"to": {
"location": "outgoing",
"name": "uniqueArray",
"ptr": ""
}
}
],
"functions": [],
"view": {
"col": 2,
"row": 5
},
"created": "2020-07-27T00:23:27.025Z",
"createdBy": {
"_id": "5e62a1e48b5a0506f10c3aa4",
"provenance": "Itential LDAP",
"username": "anto.oswin"
},
"lastUpdated": "2020-07-27T00:23:27.025Z",
"lastUpdatedBy": {
"_id": "5e62a1e48b5a0506f10c3aa4",
"provenance": "Itential LDAP",
"username": "anto.oswin"
}
}