original

WebJar for original

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

original
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

original
WebJar for original
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/unshiftio/original

Скачать original

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/original/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>original</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/original/
implementation 'org.webjars.npm:original:1.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/original/
implementation ("org.webjars.npm:original:1.0.2")
'org.webjars.npm:original:jar:1.0.2'
<dependency org="org.webjars.npm" name="original" rev="1.0.2">
  <artifact name="original" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='original', version='1.0.2')
)
libraryDependencies += "org.webjars.npm" % "original" % "1.0.2"
[org.webjars.npm/original "1.0.2"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : url-parse jar [1.4.3,2)

Модули Проекта

Данный проект не имеет модулей.

origin(al)

Made by unshiftVersion npmBuild StatusDependenciesCoverage StatusIRC channel

Original generates the origin URL for a given URL or URL object. In addition to that it also comes with a simple same function to check if two URL's have the same origin.

Install

This module is browserify and node compatible and is therefor release in the npm registry and can be installed using:

npm install --save original

Usage

In all the examples we assume that the module is loaded using:

'use strict';

var origin = require('original');

To get the origin of a given URL simply call origin function with any given URL to get origin.

var o = origin('https://google.com/foo/bar?path');

// o = https://google.com

To compare if two URL's share the same origin you can call the same method.

if (origin.same('https://google.com/foo', 'https://primus.io')) {
  console.log('same');
} else {
  console.log('guess what, google.com and primus.io are not the same origin');
}

And that's it.

License

MIT

org.webjars.npm

Версии библиотеки

Версия
1.0.2
1.0.1
1.0.0
0.0.5