dc-law
v0.1.1
Published
Library for DC Law functions
Downloads
2
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
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 the Council Period of the LawlawNo
string the law number of the Lawpdf
Boolean flag to to return the pdf
Returns Object the url for the Law
getDCCode
This function returns the DC Code url for a title and section.
Parameters
Returns Object the url for the section
Public domain
This project is in the worldwide public domain. As stated in CONTRIBUTING:
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.