{"id":19009140,"url":"https://github.com/gamtiq/numgen","last_synced_at":"2025-04-22T22:47:24.689Z","repository":{"id":12077162,"uuid":"14664597","full_name":"gamtiq/numgen","owner":"gamtiq","description":"Creates objects that generate number sequences","archived":false,"fork":false,"pushed_at":"2015-05-29T20:56:23.000Z","size":606,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T01:43:24.753Z","etag":null,"topics":["create","fibonacci","generate","generator","number","progression","seq","sequence"],"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/gamtiq.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","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":"2013-11-24T16:32:42.000Z","updated_at":"2023-11-04T13:36:33.000Z","dependencies_parsed_at":"2022-08-26T06:41:14.002Z","dependency_job_id":null,"html_url":"https://github.com/gamtiq/numgen","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamtiq%2Fnumgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamtiq%2Fnumgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamtiq%2Fnumgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamtiq%2Fnumgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gamtiq","download_url":"https://codeload.github.com/gamtiq/numgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249303569,"owners_count":21247696,"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":["create","fibonacci","generate","generator","number","progression","seq","sequence"],"created_at":"2024-11-08T19:06:45.497Z","updated_at":"2025-04-17T02:31:49.869Z","avatar_url":"https://github.com/gamtiq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# numgen\n\n[![NPM version](https://badge.fury.io/js/numgen.png)](http://badge.fury.io/js/numgen)\n[![Build Status](https://travis-ci.org/gamtiq/numgen.png)](https://travis-ci.org/gamtiq/numgen)\n\nCreates objects that generate number sequences.\nObjects are iterable according to ECMAScript 6 (for example, they can be used in `for-of` loop).\n\n**Disclaimer:** this package does not have anything common with ECMAScript 6 generators nor with `yield` operator.\n\n## Installation\n\n### Node\n\n    npm install numgen\n\n### [Component](https://github.com/componentjs/component)\n\n    component install gamtiq/numgen\n\n### [Jam](http://jamjs.org)\n\n    jam install numgen\n\n### [Bower](http://bower.io)\n\n    bower install numgen\n\n### [JSPM](http://jspm.io)\n\n    jspm install numgen\n\n### [SPM](http://spmjs.io)\n\n    spm install numgen\n\n### AMD, \u0026lt;script\u0026gt;\n\nUse `dist/numgen.js` or `dist/numgen.min.js` (minified version).\n\n## Usage\n\n### Node, Component, JSPM, SPM\n\n```js\nvar NumGen = require(\"numgen\");\n```\n\n### [Duo](http://duojs.org)\n\n```js\nvar NumGen = require(\"gamtiq/numgen\");\n...\n```\n\n### Jam\n\n```js\nrequire([\"numgen\"], function(NumGen) {\n    ...\n});\n```\n\n### JSPM\n\n```js\nSystem.import(\"numgen\").then(function(NumGen) {\n    ...\n});\n```\n\n### AMD\n\n```js\ndefine([\"path/to/dist/numgen.js\"], function(NumGen) {\n    ...\n});\n```\n\n### Bower, \u0026lt;script\u0026gt;\n\n```html\n\u003c!-- Use bower_components/numgen/dist/numgen.js if the library was installed by Bower --\u003e\n\u003cscript type=\"text/javascript\" src=\"path/to/dist/numgen.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n    // numgen is available via NumGen field of window object\n    ...\n\u003c/script\u003e\n```\n\n### Example\n\n```js\nvar seq = new NumGen({\n                        startValue: 3,\n                        factor: 4,\n                        valueChange: function(data) {\n                            return data.index \u003e 1 ? data.current : data.value;\n                        }\n                    });\nconsole.log(\"Geometric progression:\");\nfor (var nI = 1; nI \u003c 11; nI++) {\n    console.log(\"#\", nI, \" - \", seq.getNext());\n}\n\nconsole.log(\"Next: \");\nfor (var num of seq) {\n    nI = seq.getIndex();\n    console.log(\"#\", nI, \" - \", num);\n    if (nI \u003e 19) {\n        break;\n    }\n}\n```\n\nSee `test/numgen.js` for additional examples.\n\n## API\n\nSee `doc` folder.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamtiq%2Fnumgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgamtiq%2Fnumgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamtiq%2Fnumgen/lists"}