Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whywaita/xcodereleases-deno-sdk
Type definition of https://xcodereleases.com for deno
https://github.com/whywaita/xcodereleases-deno-sdk
deno deno-module xcode xcoderelease
Last synced: 25 days ago
JSON representation
Type definition of https://xcodereleases.com for deno
- Host: GitHub
- URL: https://github.com/whywaita/xcodereleases-deno-sdk
- Owner: whywaita
- License: mit
- Created: 2024-08-15T16:26:27.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-24T10:45:42.000Z (about 1 month ago)
- Last Synced: 2024-09-30T18:40:54.766Z (about 1 month ago)
- Topics: deno, deno-module, xcode, xcoderelease
- Language: TypeScript
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xcodereleases-deno-sdk
[![JSR](https://jsr.io/badges/@whywaita/xcodereleases-deno-sdk)](https://jsr.io/@whywaita/xcodereleases-deno-sdk)
[![npm version](https://badge.fury.io/js/xcodereleases-deno-sdk.svg)](https://badge.fury.io/js/xcodereleases-deno-sdk)xcodereleases-deno-sdk provides Type definition of [xcodereleases.com](https://xcodereleases.com) for deno
## Usage
```typescript
import type { XcodeRelease } from "jsr:@whywaita/[email protected]";// Get all xcode releases
const xr: XcodeRelease[] = await GetXcodeReleases();// Example 1: all OS compatible versions side-by-side
const releasesVersions: XcodeRelease[] = GetXcodeReleasesByRelease(
xr,
"release",
);
const compatibleVersions: XcodeRelease[] =
GetXcodeReleasesCompatibleVersion(
releasesVersions,
macOSVersion,
);// Example 2: for beta, GM versions - latest beta only
const betaVersions: XcodeRelease[] = GetXcodeReleasesByRelease(xr, "beta");
result = result.concat(betaVersions[0]);
const gmVersions: XcodeRelease[] = GetXcodeReleasesByRelease(xr, "gm");
result = result.concat(gmVersions[0]);// Example 3: old patch versions are deprecated in 3 months
const date = new Date();
date.setMonth(date.getMonth() - 3);
const oldVersions: XcodeRelease[] = GetXcodeReleasesSinceDate(xr, date);
```