n10y
Converts `internasionalization` to `i18n` (where 18 stands for the number of letters between the first i and the last n in the word internationalization) and `Wombat` to `W4t`!
Last updated a year ago by pi0 .
MIT · Original npm · Tarball · package.json
$ cnpm install n10y 
SYNC missed versions from official npm registry.

n10y (Numeronymify)

Converts internasionalization to i18n (where 18 stands for the number of letters between the first i and the last n in the word internationalization) and Wombat to W4t!

Usage

1️⃣ Install:

yarn add n10y
npm i n10y

2️⃣ Import:

import n10y from 'n10y'

const n10y = require('n10y')

3️⃣ Use:

console.log(n10y('wombat'))

Common Abbreviations

  • internasionalization (i18n)
  • localization (l10n)
  • globalization (g11n)
  • localizability (l12y)

Different implementations

Do you have another crazy idea? Open a PR! Everything working is accepted!

First (@pi0):

const i18fy = s => s[0] + (s.length - 2) + s[s.length - 1]

Shift/Pop (@pi0):

const i18fy = s => s.split('').shift() + (s.length - 2) + s.split('').pop()

Related Projects

  • n10y - Numeronymify everything

License

MIT

Inspired by a tweet from @alvarotrigo. Also thanks to Harald Atteneder for package name suggestion.

Current Tags

  • 1.0.0                                ...           latest (a year ago)

2 Versions

  • 1.0.0                                ...           a year ago
  • 0.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |