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.78 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.77 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.76 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.75 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.74 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.73 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.72 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.71 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.70 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.69 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.68 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.67 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.66 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.65 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.64 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.63 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.62 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.61 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.60 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.59 tracks/ecmascript/exercises/acronym/example.js