{"id":15458166,"url":"https://github.com/matubu/de-bruijn-generator","last_synced_at":"2025-03-30T16:21:07.678Z","repository":{"id":121575575,"uuid":"353106675","full_name":"matubu/de-bruijn-generator","owner":"matubu","description":"📦 A javascript implementation of the de Bruijn sequence algorithm","archived":false,"fork":false,"pushed_at":"2022-05-10T18:47:31.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-23T23:46:48.023Z","etag":null,"topics":["algorithm","browser","combinations","debruijn","generator","javascript","js","nodejs","sequence"],"latest_commit_sha":null,"homepage":"","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/matubu.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":"2021-03-30T18:43:25.000Z","updated_at":"2024-08-20T03:03:55.474Z","dependencies_parsed_at":"2023-03-19T16:55:16.168Z","dependency_job_id":null,"html_url":"https://github.com/matubu/de-bruijn-generator","commit_stats":{"total_commits":40,"total_committers":2,"mean_commits":20.0,"dds":0.275,"last_synced_commit":"ec7f3451512457001d1956afc531fc91a49f9926"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matubu%2Fde-bruijn-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matubu%2Fde-bruijn-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matubu%2Fde-bruijn-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matubu%2Fde-bruijn-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matubu","download_url":"https://codeload.github.com/matubu/de-bruijn-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246343522,"owners_count":20762054,"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":["algorithm","browser","combinations","debruijn","generator","javascript","js","nodejs","sequence"],"created_at":"2024-10-01T23:00:07.041Z","updated_at":"2025-03-30T16:21:07.625Z","avatar_url":"https://github.com/matubu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# De Bruijn sequence javascript generator\n📦 a javascript implementation of the [de Bruijn sequence](https://en.wikipedia.org/wiki/De_Bruijn_sequence) algorithm\n\n## Exemple :\n\n``` js\nconst { deBruijn } = require('de-bruijn-generator');\n\nlet generator = deBruijn(10, 8), value; // create a generator for a 8 digits code in base 10\n// if the third argument is true you will get the entire code every time\n\nwhile (value = generator.next().value) // here value contain only the new digit\n  console.log(value);\n```\n\n## Methods\n\nThe only method provided is call `deBruijn` it take three arguments :\n  - `k` is the alphabet (as an array) or the max digit (excluded)\n  - `n` is the length of the code\n  - `s` is optional (false by default), if true the entire code will be returned at every iterations\n\n## Install :\n\nWith [npm](https://www.npmjs.com/package/de-bruijn-generator)\n```\nnpm install de-bruijn-generator\n```\n\nOn browser\n``` html\n\u003cscript src=\"https://unpkg.com/de-bruijn-generator/src/index.js\"\u003e\u003c/script\u003e\n```\n``` js\nlet generator = deBruijnGenerator.deBruijn(10, 8);\ngenerator.next().value;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatubu%2Fde-bruijn-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatubu%2Fde-bruijn-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatubu%2Fde-bruijn-generator/lists"}