PHPackages                             jstewmc/expand-abbreviations - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jstewmc/expand-abbreviations

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jstewmc/expand-abbreviations
============================

Expand abbreviations

v1.0.0(8y ago)021MITPHPPHP ^7.0

Since May 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jstewmc/expand-abbreviations)[ Packagist](https://packagist.org/packages/jstewmc/expand-abbreviations)[ RSS](/packages/jstewmc-expand-abbreviations/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

expand-abbreviations
====================

[](#expand-abbreviations)

A service to expand abbreviations:

```
namespace Jstewmc\ExpandAbbreviations;

// define replacements (i.e., replace "foo" with "bar")
$replacements = ['foo' => 'bar'];

// instantiate service
$service = new ExpandAbbreviations($replacements);

// expand abbreviations
$service('foo bar baz');   // returns "bar bar baz"
$service('foo. bar baz');  // returns "bar bar baz"
$service('qux');           // returns "qux"
```

Given an array of *replacements* indexed by *abbreviation*, this library will expand all occurences of an abbreviation in a string to its corresponding replacement.

Keep in mind, this library is case-sensitive but trailing-period agnostic.

Author
------

[](#author)

[Jack Clayton](mailto:clayjs0@gmail.com)

Version
-------

[](#version)

### 0.1.0, May 29, 2017

[](#010-may-29-2017)

- Initial release

License
-------

[](#license)

[MIT](https://github.com/jstewmc/expand-abbreviations/blob/master/LICENSE)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3269d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50fecae0a7fd2119681bc133e496e7166b01a59f850a3c909e100bd427c6b28b?d=identicon)[Jstewmc](/maintainers/Jstewmc)

---

Top Contributors

[![jstewmc](https://avatars.githubusercontent.com/u/1192893?v=4)](https://github.com/jstewmc "jstewmc (2 commits)")

---

Tags

phpexpandjstewmcabbreviations

### Embed Badge

![Health badge](/badges/jstewmc-expand-abbreviations/health.svg)

```
[![Health](https://phpackages.com/badges/jstewmc-expand-abbreviations/health.svg)](https://phpackages.com/packages/jstewmc-expand-abbreviations)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
