{"id":18470370,"url":"https://github.com/aliencreations/alien-node-list-utils","last_synced_at":"2025-05-12T03:10:32.980Z","repository":{"id":57176097,"uuid":"55090704","full_name":"AlienCreations/alien-node-list-utils","owner":"AlienCreations","description":"Collection of array helpers.","archived":false,"fork":false,"pushed_at":"2023-09-13T21:25:39.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-09T00:12:53.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlienCreations.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-30T19:18:06.000Z","updated_at":"2023-09-13T15:04:43.000Z","dependencies_parsed_at":"2024-11-06T10:13:49.315Z","dependency_job_id":"73710385-c84a-43ba-80d6-a4f5e92484c9","html_url":"https://github.com/AlienCreations/alien-node-list-utils","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"2f472941fcf8012862fd2d1890cfab595f63267a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienCreations%2Falien-node-list-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienCreations%2Falien-node-list-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienCreations%2Falien-node-list-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienCreations%2Falien-node-list-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlienCreations","download_url":"https://codeload.github.com/AlienCreations/alien-node-list-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166523,"owners_count":21864482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T10:13:44.358Z","updated_at":"2025-05-09T00:12:56.923Z","avatar_url":"https://github.com/AlienCreations.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alien-node-list-utils\nHelper functions for arrays on NodeJS. The functions are pure and curried with Ramda.\n\n[![Build Status](https://travis-ci.org/AlienCreations/alien-node-list-utils.svg?branch=master)](https://travis-ci.org/AlienCreations/alien-node-list-utils) [![Coverage Status](https://coveralls.io/repos/AlienCreations/alien-node-list-utils/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/AlienCreations/alien-node-list-utils?branch=master) [![npm version](http://img.shields.io/npm/v/alien-node-list-utils.svg)](https://npmjs.org/package/alien-node-list-utils) [![Dependency Status](https://david-dm.org/AlienCreations/alien-node-list-utils.svg)](https://david-dm.org/AlienCreations/alien-node-list-utils)\n\n## Install\n\n```\n$ npm install alien-node-list-utils --save\n```\n\nRun the specs\n\n```\n$ npm test\n```\n\n## Methods\n\n#### filterOutItem\nGiven a list and an item, returns a copy of the list absent said item.\n\n```js\n\nvar listUtils  = require('alien-node-list-utils'),\n    list       = ['a', 'b', 'c', 'd'];\n    \nlistUtils.filterOutItem('b', list); // ['a', 'c', 'd']\n\n```\n\n#### filterOutObject\nGiven a key, value, and list, returns a copy of the list absent the object(s) which match said k/v pair.\n\n```js\n\nvar listUtils = require('alien-node-list-utils'),\n    list      = [{ foo : 'bar'}, {baz : 'bat'}, {buz : 'but'}];\n    \nlistUtils.filterOutObject('baz', 'bat', list); // [{ foo : 'bar'}, {buz : 'but'}]\n\n```\n\n#### maybeDropLastItem\nGiven a qualifying drop length and a list, returns a new list who's last item is dropped if the list \nlength exceeds or equals provided drop length\n\n```js\n\nvar listUtils = require('alien-node-list-utils'),\n    list1     = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'],\n    list2     = ['x', 'y', 'z'];\n\nlistUtils.maybeDropLastItem(5, list1); // ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']\nlistUtils.maybeDropLastItem(5, list2); // ['x', 'y', 'z']\n\n```\n\n#### sortAsc\nSimple ascending sorter function\n\n```js\n\nvar listUtils = require('alien-node-list-utils'),\n    list      = ['b', 'd', 'a', 'c'];\n\nlistUtils.sortAsc(list1); // ['a', 'b', 'c', 'd']\n\n```\n\n#### sortDesc\nSimple descending sorter function\n\n```js\n\nvar listUtils = require('alien-node-list-utils'),\n    list      = ['b', 'd', 'a', 'c'];\n\nlistUtils.sortDesc(list1); // ['d', 'c', 'b', 'a']\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencreations%2Falien-node-list-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliencreations%2Falien-node-list-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencreations%2Falien-node-list-utils/lists"}