Socket
Book a DemoInstallSign in
Socket

mapcode-regex

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

mapcode-regex

Regular expression for matching mapcodes

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
110
86.44%
Maintainers
1
Weekly downloads
 
Created
Source

mapcode-regex

Regular expression for matching mapcodes

Install

$ npm install mapcode-regex

Usage

import mapcodeRegex from 'mapcode-regex';

mapcodeRegex().test('4J.Q2');
//=> true

mapcodeRegex().test('Hawaii ZSR.3J');
//=> true

mapcodeRegex().exec('This is a mapcode FRA 4J.Q2')[0];
//=> 'FRA 4J.Q2'

'Multiple FRA 4J.Q2 Hawaii ZSR.3J mapcodes'.match(mapcodeRegex());
//=> ['FRA 4J.Q2', 'Hawaii ZSR.3J']

Tip

You can use clone-regexp to change the flags. In this case, maybe remove the global flag.

  • mapcode - Find mapcodes in a string

Keywords

mapcode

FAQs

Package last updated on 10 Aug 2021

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