A simple utils functions for interacting with Indian courts data.
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.
npm install court-utils
import { isFilingNumber } from 'court-utils'
returns a boolean whether given string is filing number or not
returns a boolean whether given string is case number number or not
While showing the CI number they shows like GJHC01-123456-123456 but internally they use it like GJHC01123456123456 so this method returns that.
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.
takes something like R/SCA/12319/2020
and returns 202100123192020 which is usable internally to communicate further with court's data.
- lodash
got an idea in mind? let's make it a reality.