Package Exports
- text-optional
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (text-optional) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Description
Compare a string with optional characters
For example:
Given the words:
configure terminal
... We would like to allow certain abbreviations. We would take the optional text and enclose them in parentheses.
conf(igure) t(erminal)
This means that any of the following examples will return true:
conf t
confi t
confi te
confi termi
configure ter
...etc
Installation
npm install text-optional
Usage
var optional = require('text-optional');
optional('con t', 'conf(igure) t(erminal)')
// true
optional('c ter', 'conf(igure) t(erminal)')
//false