Socket
Book a DemoInstallSign in
Socket

court-utils

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

court-utils

A simple utils for interacting with e-courts data.

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

Indian Court Utils

A simple utils functions for interacting with Indian courts data.

Why?

I have created several microservices which works with data coming from several courts of India. Instead of writing/copying function again and again. I thought it would be easier to create a package and import it everywhere. That would be easier to manage and actual code will be more readable.

Installation

npm install court-utils

Usage

import { isFilingNumber } from 'court-utils'

Methods

isFilingNumber(number_in_string)

returns a boolean whether given string is filing number or not

isCaseNumber(number_in_string)

returns a boolean whether given string is case number number or not

formatCINumber(number_in_string)

While showing the CI number they shows like GJHC01-123456-123456 but internally they use it like GJHC01123456123456 so this method returns that.

formatOriginalCaseNumber(number_in_string)

case number usually has / in them like R/SCA/12319/2020 some times it confuses language because / is being used as path navigator in Linux. let's say you are storing a file at a location using path if you add case number like the example then it will create 3 folders R, SCA and 12319 and store the data with filename 2020.

so better to swap those / slashes to - dashes. That's what this method does.

getInternalCaseNumber(number_in_string)

takes something like R/SCA/12319/2020 and returns 202100123192020 which is usable internally to communicate further with court's data.

dependencies

  • lodash

Contact

got an idea in mind? let's make it a reality.

Contact me on twitter Contact me on telegram Mail me Linked In profile

Keywords

india

FAQs

Package last updated on 24 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