-
updateSection(content, section, matchesStart, matchesEnd, top) → {String}
-
Updates the content with the given section.
If previous section is found it is replaced. Otherwise the section is appended to the end of the content.
Parameters:
Name Type Description content
String that may or may not include a previously added section
section
String the section to update
matchesStart
function when called with a line needs to return true iff it is the section start line
matchesEnd
function when called with a line needs to return true iff it is the section end line
top
boolean forces the section to be added at the top of the content if a replacement couldn't be made
- Source:
Returns:
content with updated section
- Type
- String
-
updateSection::parse(lines, matchesStart, matchesEnd) → {object}
-
Finds the start and end lines that match the given criteria. Used by update-section itself.
Use it if you need to get information about where the matching content is located.
Parameters:
Name Type Description lines
Array.<string> the lines in which to look for matches
matchesStart
function when called with a line needs to return true iff it is the section start line
matchesEnd
function when called with a line needs to return true iff it is the section end line
- Source:
Returns:
with the following properties: hasStart, hasEnd, startIdx, endIdx
- Type
- object
Maintenance
Commit Frequency
Further analysis of the maintenance status of update-section based on released npm versions cadence, the repository activity, and other data points determined that its maintenance is Inactive.
An important project maintenance signal to consider for update-section is that it hasn't seen any new versions released to npm in the past 12 months, and could be considered as a discontinued project, or that which receives low attention from its maintainers.
In the past month we didn't find any pull request activity or change in issues status has been detected for the GitHub repository.