# apeman-service-url

> Service for URL

Latest version **2.0.0** (published 2017-02-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install apeman-service-url
pnpm add apeman-service-url
yarn add apeman-service-url
bun add apeman-service-url
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-02-12 |
| First published | 2017-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | apeman, service |

## Links

- npm: https://www.npmjs.com/package/apeman-service-url
- Repository: https://github.com/apeman-service-labo/apeman-service-url
- Homepage: https://github.com/apeman-service-labo/apeman-service-url#readme
- Issues: https://github.com/apeman-service-labo/apeman-service-url/issues
- npm.io page: https://npm.io/package/apeman-service-url

## Dependencies (5)

- [co](https://npm.io/package/co.md) ^4.6.0
- [qs](https://npm.io/package/qs.md) ^6.3.0
- [abind](https://npm.io/package/abind.md) ^1.0.0
- [debug](https://npm.io/package/debug.md) ^2.6.1
- [apeman-service-base](https://npm.io/package/apeman-service-base.md) ^2.0.1

## Recent versions

- 2.0.0 (latest) — 2017-02-12
- 1.0.0 — 2017-01-31

## README

apeman-service-url
==========

<!---
This file is generated by ape-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/apeman-service-labo/apeman-service-url
[bd_travis_url]: http://travis-ci.org/apeman-service-labo/apeman-service-url
[bd_travis_shield_url]: http://img.shields.io/travis/apeman-service-labo/apeman-service-url.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/apeman-service-labo/apeman-service-url
[bd_travis_com_shield_url]: https://api.travis-ci.com/apeman-service-labo/apeman-service-url.svg?token=
[bd_license_url]: https://github.com/apeman-service-labo/apeman-service-url/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/apeman-service-labo/apeman-service-url
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-service-labo/apeman-service-url.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-service-labo/apeman-service-url.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/apeman-service-labo/apeman-service-url
[bd_gemnasium_shield_url]: https://gemnasium.com/apeman-service-labo/apeman-service-url.svg
[bd_npm_url]: http://www.npmjs.org/package/apeman-service-url
[bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-service-url.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Service for URL

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->

<a name="section-doc-guides-01-installation-md"></a>

Installation
-----

```bash
$ npm install apeman-service-url --save
```


<!-- Section from "doc/guides/01.Installation.md.hbs" End -->

<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->

<a name="section-doc-guides-02-usage-md"></a>

Usage
---------

```javascript
#!/usr/bin/env node

'use strict'

const { ApUrlService } = require('apeman-service-url')
const { createStore } = require('redux')
const { reducer } = require('apeman-service-base')
const co = require('co')

co(function * () {
  let store = createStore(reducer)
  let service = new ApUrlService(store)

  let link = service.resolveLink('/foo/:bar_id', {
    barId: 3
  })

  /* ... */
}).catch((err) => console.error(err))

```


<!-- Section from "doc/guides/02.Usage.md.hbs" End -->

<!-- Section from "doc/guides/03.API.md.hbs" Start -->

<a name="section-doc-guides-03-a-p-i-md"></a>

API
---------

# apeman-service-url@2.0.0

Service for URL

+ Functions
  + [create(args)](#apeman-service-url-function-create)
+ [ApUrlService](apeman-service-url-classes) Class
  + [new ApUrlService(store, options)](#apeman-service-url-classes-ap-url-service-constructor)
  + [service.resolveLink(url, params)](#apeman-service-url-classes-ap-url-service-resolveLink)
  + [service.mergeQueryString(url, query)](#apeman-service-url-classes-ap-url-service-mergeQueryString)

## Functions

<a class='md-heading-link' name="apeman-service-url-function-create" ></a>

### create(args) -> `ApUrlService`

Create the service instance

| Param | Type | Description |
| ----- | --- | -------- |
| args | * |  |



<a class='md-heading-link' name="apeman-service-url-classes"></a>

## ApUrlService Class

Service


<a class='md-heading-link' name="apeman-service-url-classes-ap-url-service-constructor" ></a>

### new ApUrlService(store, options)

Constructor of ApUrlService class

| Param | Type | Description |
| ----- | --- | -------- |
| store | Object | Redux store |
| options | Object | Optional settings |


<a class='md-heading-link' name="apeman-service-url-classes-ap-url-service-resolveLink" ></a>

### service.resolveLink(url, params) -> `string`

Resolve an link

| Param | Type | Description |
| ----- | --- | -------- |
| url | string | Url string |
| params | Object | URL param values |


<a class='md-heading-link' name="apeman-service-url-classes-ap-url-service-mergeQueryString" ></a>

### service.mergeQueryString(url, query) -> `string`

Merge query string

| Param | Type | Description |
| ----- | --- | -------- |
| url | string | Url to merge with |
| query | Object | Query data |







<!-- Section from "doc/guides/03.API.md.hbs" End -->


<!-- Sections Start -->


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/apeman-service-labo/apeman-service-url/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [apeman][apeman_url]

[apeman_url]: https://github.com/apeman-labo/apeman

<!-- Links End -->

---
_Source: https://npm.io/package/apeman-service-url · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
