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.58 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.57 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.56 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.55 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.54 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.53 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.52 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.51 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.50 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.49 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.48 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.47 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.46 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.45 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.44 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.43 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.42 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.41 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.40 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.39 tracks/ecmascript/exercises/acronym/example.js