Sha256: 0d765b8ee71d87e44550a64b247c8ab232890b877fa6efbede8b333415d4fbfb
Contents?: true
Size: 363 Bytes
Versions: 4
Compression:
Stored size: 363 Bytes
Contents
module.exports.readVersion = function (contents) { const regex = /VERSION = "(\d+\.\d+\.\d+)"/g const result = contents.matchAll(regex) return [...result][0][1] } module.exports.writeVersion = function (contents, version) { const newContent = contents.replace( /VERSION = "(\d+\.\d+\.\d+)"/, `VERSION = "${version}"` ) return newContent }
Version data entries
4 entries across 4 versions & 1 rubygems