# dc-law

> Library for DC Law functions

Latest version **0.1.1** (published 2016-06-26) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install dc-law
pnpm add dc-law
yarn add dc-law
bun add dc-law
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2016-06-26 |
| First published | 2016-06-26 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | V. David Zvenyach |
| Maintainers | vzvenyach |

## Links

- npm: https://www.npmjs.com/package/dc-law
- Repository: https://github.com/vzvenyach/dc-law
- Issues: https://github.com/vzvenyach/dc-law/issues
- npm.io page: https://npm.io/package/dc-law

## Recent versions

- 0.1.1 (latest) — 2016-06-26
- 0.1.0 — 2016-06-26

## README

# dc-law

Now that the Official DC Code is in beta, here are some utility functions to access the code.

## Installation

`npm install dc-law`

## Usage

```js
    const dclaw = require('dc-law');
    console.log(dclaw.getDCLaw(1, 1));
    // { result: 'https://beta.code.dccouncil.us/dc/council/laws/1-1.html' }

    console.log(dclaw.getDCLaw(1, 1, true));
    // { result: 'https://beta.code.dccouncil.us/dc/council/laws/docs/1-1.pdf' }

    console.log(dclaw.getDCCode(2, 541));
    // { result: 'https://beta.code.dccouncil.us/dc/council/code/sections/2-541.html' }
```

## API

### getDCLaw

This function returns the DC Code url for a title and section.

**Parameters**

-   `councilPeriod` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the Council Period of the Law
-   `lawNo` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the law number of the Law
-   `pdf` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** flag to to return the pdf

Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the url for the Law

### getDCCode

This function returns the DC Code url for a title and section.

**Parameters**

-   `title` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The title of the DC Code
-   `section` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The section of the DC Code

Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the url for the section

## Public domain

This project is in the worldwide [public domain](LICENSE.md). As stated in [CONTRIBUTING](CONTRIBUTING.md):

>  This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
>  All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

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