Coder Social home page Coder Social logo

court-utils's Introduction

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

court-utils's People

Contributors

vasani-arpit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.