UNPKG

git-tag-stream

Version:

Shelling out to `git-tag` in a Node streamy way for listing tags.

18 lines (12 loc) 411 B
'use strict'; var gitSpawnedStream = require('git-spawned-stream'); var parseStream = require('./lib/parser'); function streamTags(repoPath, options) { var descriptionLimit = options.descriptionLimit || 1000; var args = ['tag', '-n' + descriptionLimit]; if (options.name) { args.push('-l', options.name); } return parseStream(gitSpawnedStream(repoPath, args)); } module.exports = streamTags;