{"id":19951060,"url":"https://github.com/valueof/peakle","last_synced_at":"2025-09-19T12:32:39.557Z","repository":{"id":47466482,"uuid":"5365531","full_name":"valueof/peakle","owner":"valueof","description":"A tiny abstraction around lists that makes them more walkable.","archived":false,"fork":false,"pushed_at":"2021-08-30T18:13:57.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-13T01:06:36.002Z","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/valueof.png","metadata":{"files":{"readme":"README","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}},"created_at":"2012-08-10T05:57:29.000Z","updated_at":"2021-08-30T18:13:59.000Z","dependencies_parsed_at":"2022-09-23T08:10:53.430Z","dependency_job_id":null,"html_url":"https://github.com/valueof/peakle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valueof%2Fpeakle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valueof%2Fpeakle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valueof%2Fpeakle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valueof%2Fpeakle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valueof","download_url":"https://codeload.github.com/valueof/peakle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233570547,"owners_count":18695866,"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-13T01:06:38.401Z","updated_at":"2025-09-19T12:32:34.255Z","avatar_url":"https://github.com/valueof.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Peakle is a tiny abstraction around lists that makes them more walkable.\n\nPeakle's constructor takes only one parameter, a list of values.\n\n\tvar peakled = new Peakle([ 1, 2, 3 ]);\n\nBy default, the current position is always at the first element. If the\ninitial list is empty, then the current position is 'null'.\n\nProperties:\n\n\t* length: returns a number of elements in the underlying list.\n\t* current: returns a value of the current element.\n\nMethods:\n\n\t* next(): Moves to the next element and returns its value.\n\t* prev(): Moves to the previous element and returns its value.\n\t* peak(adv): Returns next element's value without moving its pointer.\n\t  This method accepts an optional numeric parameter. Use it if you\n\t  want to peak further.\n\t* move(index): Moves to the specified element.\n\nAll methods return 'null' if they can't return a value.\n\nExample:\n\n\tvar peakled = new Peakle([ 1, 2, 3 ]);\n\n\tpeakled.current;  // 1\n\tpeakled.peak();   // 2\n\tpeakled.peak(2);  // 3\n\n\tpeakled.next();   // 2\n\tpeakled.peak();   // 3\n\tpeakled.peak(2);  // null\n\tpeakled.peak(-1); // 1\n\n\tpeakled.prev();   // 1\n\tpeakled.move(2);  // 3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalueof%2Fpeakle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalueof%2Fpeakle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalueof%2Fpeakle/lists"}