npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@book-junction/patterns

v1.1.0

Published

A repository for commonly used patterns

Downloads

12

Readme

Book Junction Patterns

  • Author: Gaurav Sahitya
  • Version: v1.0

About About

This package contains all patterns commonly used in web and mobile development projects. Patterns defined in this package are divided into following categories

  • Commons
  • Personal Identification (PI)

Usage Usage

Let's see the paterns which are defined in the commons category.

// Importing
const Patterns = require('@book-junction/patterns');

// For checking name

const name = Patterns.common.name.test('Gaurav Sahitya'); // true

// For checking email

const email = Patterns.common.email.test('[email protected]'); // true

// For checking phone number

const phone = Patterns.common.phone.test('+919646560934'); //true

// For checking password

const password = Patterns.common.password.test('tesTing!23'); //true

// For checking date of birth

const dob = Patterns.common.dob.test('1999-07-30'); //true

Now let's see the patterns which are defined in the personal identification category (pi)

// Importing
const Patterns = require('@book-junction/patterns');

//Aadhar number
const aadharNumber = Patterns.pi.aadharNumber.test('7914-8520-1234'); // true

//Pan number
const panNumber = Patterns.pi.panNumber.test('LOTCS1963W'); // true

//Voter id number
const voterNumber = Patterns.pi.voterIdNumber.test('LAZ1775211'); // true

//Passport number
const passportNumber = Patterns.pi.passportNumber.test('M8765432'); // true

Points Points to consider

  • Password must be atleast 8 characters and atmost 32 characters long. It should also contain atleast one uppercase letter, one lowercase letter, one digit and one special character.
  • All email clients are supported by this package.
  • This package is a commonjs node package.

Author Know more about author

| Linkedin | Github | | ------------------------------------------------------- | -------------------------------------------------- |