Socket
Book a DemoInstallSign in
Socket

@mapbox/frontend-util-maybe-add-period

Package Overview
Dependencies
Maintainers
182
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/frontend-util-maybe-add-period

A Mapbox frontend utility

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
51
264.29%
Maintainers
182
Weekly downloads
 
Created
Source

@mapbox/frontend-util-maybe-add-period

Add a period to the end of a string if that string does not already end with sentence-ending punctuation.

Installation

npm install @mapbox/frontend-util-maybe-add-period

Usage

import maybeAddPeriod from '@mapbox/frontend-util-maybe-add-period';

maybeAddPeriod('Call the dentist'); // Call the dentist.
maybeAddPeriod('Call the dentist.'); // Call the dentist.
maybeAddPeriod('Call the dentist!'); // Call the dentist!
maybeAddPeriod('Call the dentist?'); // Call the dentist?

FAQs

Package last updated on 13 Nov 2017

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