{"id":28249933,"url":"https://github.com/eidellev/nahman","last_synced_at":"2025-07-24T00:33:10.837Z","repository":{"id":57110879,"uuid":"170281395","full_name":"eidellev/nahman","owner":"eidellev","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-17T09:15:01.000Z","size":290,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T22:46:42.355Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eidellev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-12T08:32:38.000Z","updated_at":"2019-02-17T09:15:03.000Z","dependencies_parsed_at":"2022-08-21T07:31:18.040Z","dependency_job_id":null,"html_url":"https://github.com/eidellev/nahman","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/eidellev/nahman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidellev%2Fnahman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidellev%2Fnahman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidellev%2Fnahman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidellev%2Fnahman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eidellev","download_url":"https://codeload.github.com/eidellev/nahman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidellev%2Fnahman/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266774778,"owners_count":23982246,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-05-19T13:16:11.296Z","updated_at":"2025-07-24T00:33:10.823Z","avatar_url":"https://github.com/eidellev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nahman\n\n---\n\n**NOTE:** _This library was conceived as an exercise, using functional programming, TDD and rollup.js._\n\nA small utility library for converting arrays into a \"stepped arrays\".\n\nA stepped array is an array where each member is a sub-array of the original, the first member is `[1]`, the second is `[1 ➜ 2]` and the last member is `[1 ➜ n]`.\n\nFor an example, if our input is `[1, 2, 3, 4]`, our output will be:\n\n```\n[\n  [1],\n  [1, 2],\n  [1, 2, 3]\n  [1, 2, 3, 4]\n]\n```\n\n## Installation\n\n```\nnpm i --save @eidellev/nahman\n# or\nyarn add @eidellev/nahman\n```\n\n## Usage\n\n```javascript\nimport nahman from '@eidellev/nahman';\n// or\nconst nahman = require('@eidellev/nahman');\n\nnahman.toSteps([1, 2, 3, 4]);\nnahman.toStepsRight([1, 2, 3, 4]);\n```\n\n## Methods\n\n- `toSteps` - Converts an array into a stepped array\n- `toStepsRight` - Converts an array into a stepped array from right to left, e.g:\n\n```\n[1, 2, 3, 4] ➜ [[1, 2, 3, 4], [1, 2, 3], [2, 3], [3]]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feidellev%2Fnahman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feidellev%2Fnahman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feidellev%2Fnahman/lists"}