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.180 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.179 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.178 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.177 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.176 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.175 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.174 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.173 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.172 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.171 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.170 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.169 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.167 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.166 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.165 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.164 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.163 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.162 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.161 tracks/ecmascript/exercises/acronym/example.js
trackler-2.2.1.160 tracks/ecmascript/exercises/acronym/example.js