{"id":20020217,"url":"https://github.com/geokaralis/jscore","last_synced_at":"2026-04-12T13:09:11.499Z","repository":{"id":127656982,"uuid":"170484781","full_name":"geokaralis/jscore","owner":"geokaralis","description":"A Javascript runtime through v8 for android, sharing code between web and mobile.","archived":false,"fork":false,"pushed_at":"2019-03-04T11:44:37.000Z","size":86447,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T16:11:28.647Z","etag":null,"topics":["android","bindings","cpp","java","javascript","kotlin","mobile","v8","vm"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geokaralis.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":"2019-02-13T10:03:32.000Z","updated_at":"2022-05-10T08:23:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0f20906-7225-414d-b41e-c9eba7f08922","html_url":"https://github.com/geokaralis/jscore","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/geokaralis%2Fjscore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geokaralis%2Fjscore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geokaralis%2Fjscore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geokaralis%2Fjscore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geokaralis","download_url":"https://codeload.github.com/geokaralis/jscore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241454201,"owners_count":19965318,"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":["android","bindings","cpp","java","javascript","kotlin","mobile","v8","vm"],"created_at":"2024-11-13T08:30:34.562Z","updated_at":"2026-04-12T13:09:11.466Z","avatar_url":"https://github.com/geokaralis.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSCore\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/docs/jscore_icon_256.png\" width=\"128\" alt=\"JSCore Logo\"/\u003e\n\u003c/p\u003e\nJSCore is an android library for running javascript inside java. It's main purpose is for code sharing between web and mobile. In it's core it uses google's v8 javascript runtime library. One main characteristic of JSCore is the concept of javascript bindings within java/kotlin, making the js library feel more like a native one.\n\n## Usage\n```kotlin\nclass Underscore(private val src: String): JSObject() {\n    // Bind Underscore.js's contains function to Kotlin for integers\n    fun contains(list: ArrayList\u003cInt\u003e, index: Int): Boolean {\n        return JSObject().bind(src).function(\"contains\", arrayListOf(list, index))\n    }\n}\n```\n```kotlin\nval list: ArrayList\u003cInt\u003e = ArrayList()\nlist.add(1)\nlist.add(2)\nlist.add(3)\n\nval underscore = Underscore(src)\nval contains = underscore.contains(list, 3) // true\n```\nJSCore also evaluates scripts as per the usual way.\n```java\nJSContext ctx = new JSContext(); // Javascript VM context\n\nString greeting = (String) ctx.evaluate(\"\"\n  + \"var message = 'hello world!'\"\n  + \"message.toUpperCase();\");\n  \nLog.d(\"Greeting\", greeting); // HELLO WORLD!\n```\n## v8\nv8 is used as JSCore's javascript runtime environment.\n\n## Kotlin\nJSCore is written entirely in Kotlin.\n\n## Contributing\nJSCore is still at the early alpha stages of architecting and c++ support through ndk. If you 'd like to contribute to this project feel free to pull request and provide ideas through issues.\n\n## LICENSE\n    Copyright (c) 2019, George Karalis.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeokaralis%2Fjscore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeokaralis%2Fjscore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeokaralis%2Fjscore/lists"}