Socket
Socket
Sign inDemoInstall

template-utils

Package Overview
Dependencies
86
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.0 to 0.6.1

8

lib/utils/index.js

@@ -325,7 +325,7 @@ 'use strict';

utils.extensionRe = function extensionRe(str, exts) {
if (typeof str !== 'string') {
throw new Error('utils.extensionRe() expects a string.');
utils.extensionRe = function extensionRe(arr) {
if (!Array.isArray(arr)) {
throw new Error('utils.extensionRe() expects an array.');
}
return new RegExp('(?:' + (exts || utils.exts(str)).join('|') + ')$');
return new RegExp('(?:' + utils.exts(arr).join('|') + ')$');
};

@@ -332,0 +332,0 @@

{
"name": "template-utils",
"description": "Utils for [Template], and Template-based applications.",
"version": "0.6.0",
"version": "0.6.1",
"homepage": "https://github.com/jonschlinkert/template-utils",

@@ -6,0 +6,0 @@ "author": {

@@ -47,23 +47,4 @@ # template-utils [![NPM version](https://badge.fury.io/js/template-utils.svg)](http://badge.fury.io/js/template-utils) [![Build Status](https://travis-ci.org/jonschlinkert/template-utils.svg)](https://travis-ci.org/jonschlinkert/template-utils)

### [headings](lib/utils/headings.js#L22)
### [.toTemplate](lib/utils/index.js#L31)
Adjust markdown heading levels.
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_.
**Params**
* `str` **{String}**
* `returns` **{String}**
**Example**
```js
utils.heading(str);
```
### [.toTemplate](lib/utils/index.js#L32)
Convert a Vinyl file object to a non-vinyl template object.

@@ -82,3 +63,3 @@

### [.toVinyl](lib/utils/index.js#L47)
### [.toVinyl](lib/utils/index.js#L46)

@@ -98,3 +79,3 @@ Convert a `template` object to a Vinyl file object.

### [.isVinyl](lib/utils/index.js#L63)
### [.isVinyl](lib/utils/index.js#L62)

@@ -115,3 +96,3 @@ Returns true if a file is a vinyl file object.

### [.pushToStream](lib/utils/index.js#L102)
### [.pushToStream](lib/utils/index.js#L101)

@@ -146,3 +127,3 @@ Push a collection of templates into the stream as vinyl files.

### [.bindAll](lib/utils/index.js#L126)
### [.bindAll](lib/utils/index.js#L125)

@@ -158,3 +139,3 @@ Bind a `thisArg` to all the functions on the target

### [.basename](lib/utils/index.js#L171)
### [.basename](lib/utils/index.js#L170)

@@ -175,3 +156,3 @@ Get the basename of a file path, excluding extension.

### [.renameKey](lib/utils/index.js#L199)
### [.renameKey](lib/utils/index.js#L198)

@@ -198,3 +179,3 @@ Rename a filepath to use as the key for caching templates.

### [.getExt](lib/utils/index.js#L233)
### [.getExt](lib/utils/index.js#L232)

@@ -217,3 +198,3 @@ Get the extension from a string or from the first string in an array of file paths.

### [.formatExt](lib/utils/index.js#L259)
### [.formatExt](lib/utils/index.js#L258)

@@ -237,3 +218,3 @@ Ensure file extensions are formatted properly for lookups.

### [.stripDot](lib/utils/index.js#L282)
### [.stripDot](lib/utils/index.js#L281)

@@ -254,3 +235,3 @@ Strip the dot from a file extension

### [.exts](lib/utils/index.js#L304)
### [.exts](lib/utils/index.js#L303)

@@ -267,3 +248,3 @@ Sanitize an array of extensions before converting them to regex.

### [.extensionRe](lib/utils/index.js#L326)
### [.extensionRe](lib/utils/index.js#L325)

@@ -280,3 +261,3 @@ Creates a regex to match only the file extensions of registered engines.

### [.arrayify](lib/utils/index.js#L349)
### [.arrayify](lib/utils/index.js#L348)

@@ -300,3 +281,3 @@ Cast `value` to an array.

### [.headings](lib/utils/index.js#L374)
### [.headings](lib/utils/index.js#L373)

@@ -303,0 +284,0 @@ Adjust markdown heading levels.

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