{"id":28534547,"url":"https://github.com/weavejester/evaljs","last_synced_at":"2025-08-27T07:16:16.011Z","repository":{"id":2632040,"uuid":"3619758","full_name":"weavejester/evaljs","owner":"weavejester","description":"Evaluate Javascript code and libraries in Clojure","archived":false,"fork":false,"pushed_at":"2012-03-04T22:58:57.000Z","size":97,"stargazers_count":20,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-11T02:53:23.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/weavejester.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":"2012-03-04T17:36:52.000Z","updated_at":"2024-02-12T12:43:50.000Z","dependencies_parsed_at":"2022-09-09T20:11:10.864Z","dependency_job_id":null,"html_url":"https://github.com/weavejester/evaljs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/weavejester/evaljs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fevaljs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fevaljs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fevaljs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fevaljs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weavejester","download_url":"https://codeload.github.com/weavejester/evaljs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fevaljs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266990934,"owners_count":24017732,"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-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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-06-09T17:11:52.856Z","updated_at":"2025-07-25T10:33:33.168Z","avatar_url":"https://github.com/weavejester.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# evaljs\n\nEvaljs is a library for evaluating Javascript code in Clojure.\n\n## Installation\n\nAdd the following dependency to your `project.clj` file:\n\n    [evaljs \"0.1.2\"]\n\n## Usage\n\nYou'll need both the `evaljs.core` and `evaljs.rhino` namespaces for\nthis to work:\n\n```clojure\n(use 'evaljs.core)\n(use 'evaljs.rhino)\n```\n\nYou can then evaluate a Javascript expression within a blank context:\n\n```clojure\n(with-context (rhino-context)\n  (prn (evaljs \"1 + 1\")))\n```\n\nOr a context with a map of initial variables:\n\n```clojure\n(with-context (rhino-context {:x 2})\n  (prn (evaljs \"x + 1\")))\n```\n\nThe return value of `evaljs` is the last statement executed. Basic\ntypes like maps and arrays are automaitcally converted between Clojure\nand Javascript types.\n\nIf you want to import a Javascript library, you can evaluate an I/O\nobject such as a file or resource:\n\n```clojure\n(require '[clojure.java.io :as io])\n\n(with-context (rhino-context)\n  (evaljs (io/resource \"some/js/library.js\"))\n  (evaljs \"someJSLibrary()\"))\n```\n\n## License\n\nCopyright (C) 2012 James Reeves\n\nDistributed under the Eclipse Public License, the same as Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavejester%2Fevaljs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweavejester%2Fevaljs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavejester%2Fevaljs/lists"}