abbrev

Like ruby's abbrev module, but in js

ISC 13 个版本
安装
npm install abbrev
yarn add abbrev
pnpm add abbrev
bun add abbrev
README

abbrev-js

Just like ruby's Abbrev.

Usage:

var abbrev = require("abbrev");
abbrev("foo", "fool", "folding", "flop");

// returns:
{ fl: 'flop'
, flo: 'flop'
, flop: 'flop'
, fol: 'folding'
, fold: 'folding'
, foldi: 'folding'
, foldin: 'folding'
, folding: 'folding'
, foo: 'foo'
, fool: 'fool'
}

This is handy for command-line scripts, or other cases where you want to be able to accept shorthands.

版本列表
5.0.0 2026-05-08
4.0.0 2025-10-20
3.0.1 2025-04-10
3.0.0 2024-09-24
2.0.0 2022-11-01
1.1.1 2017-09-28
1.1.0 2017-02-14
1.0.9 2016-06-15
1.0.7 2015-05-30
1.0.6 2015-05-21
1.0.5 2014-04-17
1.0.4 2013-01-09
1.0.3 2011-03-21