Sha256: 4900ca301084ec3073fca52858a19d57f8e3932013457d630f38e9e7f29522dd

Contents?: true

Size: 183 Bytes

Versions: 396

Compression:

Stored size: 183 Bytes

Contents

export default class Acronyms {
  static parse(phrase) {
    return phrase.match(/[A-Z]+[a-z]*|[a-z]+/g)
      .reduce((acronym, word) => acronym += word[0].toUpperCase(), '');
  }
}

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.97 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.96 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.95 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.94 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.93 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.92 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.91 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.90 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.89 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.88 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.87 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.86 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.85 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.84 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.83 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.82 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.81 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.80 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.79 tracks/ecmascript/exercises/acronym/example.js