style: use es6 in src

This commit is contained in:
Stephan Bönnemann
2015-06-11 15:05:15 -07:00
parent 5a8c8639af
commit f0bb39a22e
12 changed files with 138 additions and 160 deletions
+6 -12
View File
@@ -1,21 +1,15 @@
'use strict'
import { parseRawCommit } from 'conventional-changelog/lib/git'
var parseRawCommit = require('conventional-changelog/lib/git').parseRawCommit
module.exports = function (commits) {
var type = null
export default function (commits) {
let type = null
commits
.map(function (commit) {
return parseRawCommit(commit.hash + '\n' + commit.message)
})
.map((commit) => parseRawCommit(`${commit.hash}\n${commit.message}`))
.filter(function (commit) {
return !!commit
})
.filter((commit) => !!commit)
.every(function (commit) {
.every((commit) => {
if (commit.breaks.length) {
type = 'major'
return false