Now that the Official DC Code is in beta, here are some utility functions to access the code.
npm install dc-law
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' }
This function returns the DC Code url for a title and section.
Parameters
-
councilPeriod
string the Council Period of the Law -
lawNo
string the law number of the Law -
pdf
Boolean flag to to return the pdf
Returns Object the url for the Law
This function returns the DC Code url for a title and section.
Parameters
Returns Object the url for the section
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.