Socket
Book a DemoInstallSign in
Socket

@cityssm/docket-parser

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cityssm/docket-parser

Parses Ontario Provincial Offences docket print data into JavaScript objects.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

node-docket-parser

npm (scoped) DeepSource Maintainability codecov

Parses Ontario Provincial Offences docket print data into JavaScript objects.

Installation

npm install @cityssm/docket-parser

Usage

import { parseDockets } from '@cityssm/docket-parser'

const docketFileText = fs.readFileSync('test/dockets/whovilleDocket.txt').toString()

const docket = parseDockets(docketFileText)

console.log(docket)

/*
{
  "docketDescription": "POA - ALL",
  "pageNumber": 1,
  "court": "1234",
  "room": "POA",
  "prosecutor": "MAYWHO, A",
  "courtDate": "2024/01/10",
  "courtTime": "09:30",
  "justiceOfThePeace": "WHOVIER, M",
  "clerk": "WHO, C",
  "docketItems": [
    {
      "lineNumber": 1,
      "informationNumber": "999 XX XXX     -00",
      "defendantBirthDate": "1970/01/01",
      "counts": 1,
      "appTypeNumber": "FA 0",
      "appTypeDescription": "First Appearance",
      "compBadgeNumber": "XXXXX 0000",
      "offenceDate": "2023/12/24",
      "defendantName": "GRINCH, THE",
      "offenceDescription": "STEALING CHRISTMAS",
      "action": "WD",
      "actionDescription": "Withdrawn",
      "crEl": "",
      "plea": "",
      "find": "",
      "comment": "WITHDRAWN"
    }
  ]
}
*/

Keywords

court

FAQs

Package last updated on 29 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts