Node os.platform function | API Reference | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:os/
platformFplatform
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:os/
platformFplatform
function
os.platformfunction
platform(): Platform;
Returns a string identifying the operating system platform for which the Node.js binary was compiled. The value is set at compile time. Possible values are 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32'.
The return value is equivalent to process.platform.
The value 'android' may also be returned if Node.js is built on the Android operating system. Android support is experimental.
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →