![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@churchcenter/url
Advanced tools
Church Center origin generator for JavaScript.
Builds runtime-environment-considered origins and urls in JavaScript for Church Center subdomains.
For those familiar with @planningcenter/url
, it may be worth noting that this generator has no concerns about what application is building the urls.
This package is primarily concerned with building origins and urls in the browser.
It is smart about inferring the Church Center origin from the current window.location.origin
.
If window.location.origin
is unavailable (like in the tests), an origin can be passed explicitly, but you'll most likely only need that for composing urls across subdomains.
// window.location == "https://carlsbad.churchcenter.com/giving"
import { buildSubdomain, buildUrl } from "@churchcenter/url"
let api = buildSubdomain("api")
// => https://api.churchcenter.com
let myGroupsUrl = buildUrl("/groups/profile")
// => https://carlsbad.churchcenter.com/groups/profile
Want to build API urls or app-specific urls? Compose to your heart's content!
// window.location == "http://first.churchcenter.test/giving/profile"
import { buildSubdomain, buildUrl } from "@churchcenter/url"
function bouldGroupsUrl(pathname) {
return buildUrl(`/groups${pathname}`)
}
let myGroupsUrl = buildGroupsUrl("/profile")
// => http://first.churchcenter.test/groups/profile
function buildApiUrl(pathname) {
return buildUrl(pathname, buildSubdomain("api"))
}
function buildPeopleApiUrl(pathname) {
return buildApiUrl(`/people/v2${pathname}`)
}
function buildFormUrl(id) {
return buildPeopleApiUrl(`/forms/${id}`)
}
let formUrl = buildFormUrl(42)
// => http://api.churchcenter.test/people/v2/forms/42
// function build.... you get the idea
Script tag on Rails
<script type="javascript" src="https://unpkg.com/@churchcenter/url"></script>
<!-- exposed as global `churchcenterurl` -->
Webpacker on Rails
yarn add @churchcenter/url
import { buildSubdomain, buildUrl } from "@churchcenter/url";
FAQs
A dumb url origin generator in JS
The npm package @churchcenter/url receives a total of 0 weekly downloads. As such, @churchcenter/url popularity was classified as not popular.
We found that @churchcenter/url demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.