{"id":33481,"date":"2021-08-26T16:55:24","date_gmt":"2021-08-26T20:55:24","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=33481"},"modified":"2021-08-26T16:55:24","modified_gmt":"2021-08-26T20:55:24","slug":"jsc","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/08\/26\/jsc\/","title":{"rendered":"jsc"},"content":{"rendered":"<p><a href=\"https:\/\/furbo.org\/2021\/08\/25\/jsc-my-new-best-friend\/\">Craig Hockenberry<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=28306305\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/furbo.org\/2021\/08\/25\/jsc-my-new-best-friend\/\">\n<p>In the JavaScript framework used by Safari and other parts of Apple&rsquo;s products, there is a tool called <code>jsc<\/code>. It&rsquo;s a command line interface for JavaScript that uses the same code as the rest of the system.<\/p>\n<p>You can find the binary at <code>\/System\/Library\/Frameworks\/JavaScriptCore.framework\/Versions\/Current\/Helpers\/jsc<\/code>. That path is unwieldy, so I have an alias set up that lets my just type <code>jsc<\/code> in the Terminal.<\/p>\n<p>So what can you do with <code>jsc<\/code>? Pretty much anything you can do with JavaScript in a browser with the caveat that there aren&rsquo;t <code>document<\/code> and <code>window<\/code> instances.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/07\/06\/boop-1-3-1\/\">Boop 1.3.1<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Craig Hockenberry (Hacker News): In the JavaScript framework used by Safari and other parts of Apple&rsquo;s products, there is a tool called jsc. It&rsquo;s a command line interface for JavaScript that uses the same code as the rest of the system. You can find the binary at \/System\/Library\/Frameworks\/JavaScriptCore.framework\/Versions\/Current\/Helpers\/jsc. That path is unwieldy, so I have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-08-26T20:55:27Z","apple_news_api_id":"9e9275b6-1f76-4d5f-9657-8576f95dfcf2","apple_news_api_modified_at":"2021-08-26T20:55:27Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AnpJ1th92TV-WV4V2-V388g","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[346,30,1891,71,318,258],"class_list":["post-33481","post","type-post","status-publish","format-standard","hentry","category-technology","tag-javascript","tag-mac","tag-macos-11-0","tag-programming","tag-terminal","tag-unicode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/33481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=33481"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/33481\/revisions"}],"predecessor-version":[{"id":33482,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/33481\/revisions\/33482"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=33481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=33481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=33481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}