Socket
Socket
Sign inDemoInstall

template-utils

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

template-utils

Utils for [Template](https://github.com/jonschlinkert/template).


Version published
Weekly downloads
217
decreased by-20.51%
Maintainers
2
Weekly downloads
 
Created
Source

template-utils NPM version

Utils for Template.

Install with npm

npm i template-utils --save

Run tests

npm test

Usage

var utils = require('template-utils');

API

.defaultProps

  • template {Object}: Template Object to add properties to.

Setup default properties and objects on a template object.

.headings

Adjust markdown heading levels.

  • str {String}
  • returns: {String}

Adds one heading level next to all markdown headings to make them correct within the scope of the inheriting document. Headings in fenced code blocks are skipped.

utils.heading(str);

.parsePath

  • template {Object}: Template object

Add parsed src and dest path properties to the data object.

.toTemplate

Convert a Vinyl file object to a non-vinyl template object.

  • file {Object}: Vinyl file object
  • returns {Object}: Object with properties expected by Template or Template apps
var template = utils.toTemplate(file);

.toVinyl

Convert a template object to a Vinyl file object.

  • file {Object}: Object with properties expected by Template
  • returns {Object}: Vinyl file object
var file = utils.toVinyl(template);

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2014-2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb on February 01, 2015.

Keywords

FAQs

Package last updated on 15 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc