{"id":16483517,"url":"https://github.com/dbohdan/tcl-duktape","last_synced_at":"2025-03-23T12:32:26.366Z","repository":{"id":31164258,"uuid":"34724404","full_name":"dbohdan/tcl-duktape","owner":"dbohdan","description":"Tcl bindings for Duktape, an embedded JavaScript interpreter","archived":false,"fork":false,"pushed_at":"2024-10-12T11:09:34.000Z","size":2491,"stargazers_count":19,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T20:16:46.106Z","etag":null,"topics":["duktape","embedded-scripting-languages","javascript","json","tcl","tcl-extension"],"latest_commit_sha":null,"homepage":"https://wiki.tcl-lang.org/page/tcl-duktape","language":"C","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/dbohdan.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-28T10:33:46.000Z","updated_at":"2024-08-05T14:58:33.000Z","dependencies_parsed_at":"2024-10-28T16:25:45.633Z","dependency_job_id":null,"html_url":"https://github.com/dbohdan/tcl-duktape","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Ftcl-duktape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Ftcl-duktape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Ftcl-duktape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Ftcl-duktape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbohdan","download_url":"https://codeload.github.com/dbohdan/tcl-duktape/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245104464,"owners_count":20561376,"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":["duktape","embedded-scripting-languages","javascript","json","tcl","tcl-extension"],"created_at":"2024-10-11T13:14:17.533Z","updated_at":"2025-03-23T12:32:25.682Z","avatar_url":"https://github.com/dbohdan.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tcl-duktape\n\nThis Tcl extension provides bindings for [Duktape](http://duktape.org/),\na JavaScript interpreter library.\n\n## Installation\n\nYou will need Tcl 8.5 or 8.6 installed on your system and available as `tclsh`\nto build tcl-duktape. You will also need the header files for Tcl. Duktape\nitself is bundled in the repository. To use the object-oriented API wrapper\nand the JSON object system [TclOO](https://wiki.tcl-lang.org/18152) is\nrequired.\n\n```sh\n# Build and test.\n./configure\nmake test\n# Install the package.\nsudo make install\n```\n\n## API\n\n### Procedures\n\n* `::duktape::init ?-safe \u003cboolean\u003e?` -\u003e token\n* `::duktape::close token` -\u003e (nothing)\n* `::duktape::eval token code` -\u003e (evaluation result)\n* `::duktape::call-method token method this ?{arg ?type?}?` -\u003e (evaluation result)\n* `::duktape::call-method-(str|num) token method this ?arg?` -\u003e (evaluation result)\n* `::duktape::call token function ?{arg ?type?}?` -\u003e (evaluation result)\n* `::duktape::call-(str|num) token function ?arg?` -\u003e (evaluation result)\n* `::duktape::js-proc token name arguments body` -\u003e (nothing)\n* `::duktape::tcl-function token name ?returnType? arguments body` -\u003e (nothing)\n* `::duktape::make-safe token` -\u003e (nothing)`\n* `::duktape::make-unsafe token` -\u003e (nothing)`\n\n`make-safe` and `make-unsafe` control whether a new JavaScript function named\n`Duktape.tcl.eval()` is created that allows for evaluation of arbitrary Tcl\nscripts.\n\nThe optional `returnType` argument to `tcl-function` may be one of:\n  * `boolean` — results in a boolean\n  * `bytearray` — results in a Duktape [buffer](https://duktape.org/guide.html#bufferobjects)\n  * `string` — default; results in a string\n  * `undefined` — return value ignored\n  * `null` — results in a JavaScript null regardless of the actual data\n  * `double` — results in a number\n  * `integer` — same as `double`\n  * `bigint` — results in a JavaScript string representation of an integer\n  * `json` — expects a JSON string; the result is the string decoded as JSON\n  * `array itemType` — for each item in the Tcl list, encode as `itemType`;\n                       the result is an array\n\n### TclOO wrapper\n\n* `::duktape::oo::Duktape new` -\u003e (objName)\n* `$objName destroy` -\u003e (nothing)\n* `$objName eval code` -\u003e (evaluation result)\n* `$objName call-method method this ?{arg ?type?}?` -\u003e (evaluation result)\n* `$objName call-method-(str|num) method this ?arg?` -\u003e (evaluation result)\n* `$objName call function ?{arg ?type?}?` -\u003e (evaluation result)\n* `$objName call-(str|num) function ?arg?` -\u003e (evaluation result)\n* `$objName js-proc name arguments body` -\u003e (nothing)\n* `$objName js-method name arguments body` -\u003e (nothing)\n* `$objname tcl-function name ?returnType? arguments body -\u003e (nothing)\n* `$objName token` -\u003e token (for the procedural API)\n\n`js-method` defines a new method in JavaScript on the Duktape object instance\n`$objName`.\n\n### JSON objects\n\n* `::duktape::oo::JSON new` -\u003e (objName)\n* `$objName destroy` -\u003e (nothing)\n* `$objName get key ?key ...?` -\u003e (value)\n* `$objName get-json ?key ...?` -\u003e (JSON string)\n* `$objName set key ?key ...? value` -\u003e (nothing)\n* `$objName set-json ?key ...? value` -\u003e (nothing)\n* `$objName stringify` -\u003e (JSON string)\n* `$objName parse value` -\u003e (nothing)\n\nNote that `get` returns objects to Tcl as the string \"[object Object]\" or\nsimilar. Use `stringify` to get their JSON representation instead.\n\n## License\n\nMIT.\n\nDuktape 2.7 is copyright (c) 2013-2022 by Duktape authors and is distributed\nunder the MIT license. See `vendor/duktape/LICENSE.txt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbohdan%2Ftcl-duktape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbohdan%2Ftcl-duktape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbohdan%2Ftcl-duktape/lists"}