Socket
Socket
Sign inDemoInstall

template-utils

Package Overview
Dependencies
73
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

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
251
increased by10.09%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

template-utils NPM version Build Status

Utils for Template.

Install with npm

npm i template-utils --save

Running tests

Install dev dependencies:

npm i -d && 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-cli on February 27, 2015.

Keywords

FAQs

Last updated on 27 Feb 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc