Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

template-file

Package Overview
Dependencies
Maintainers
8
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

template-file - npm Package Compare versions

Comparing version 5.0.1 to 5.1.0

5

dist/index.d.ts

@@ -1,3 +0,3 @@

declare type DataValue = string | number | Data | (() => string | number | Data);
interface Data extends Record<string | number | symbol, DataValue | DataValue[]> {
export declare type DataValue = string | number | Data | (() => string | number | Data);
export interface Data extends Record<string | number | symbol, DataValue | DataValue[]> {
}

@@ -8,2 +8,1 @@ export declare function renderGlob(sourceGlob: string, data: Data, onFileCallback: (filename: string, contents: string) => void): Promise<void>;

export declare function renderToFolder(sourceGlob: string, destination: string, data: Data): Promise<void>;
export {};

10

dist/index.js

@@ -35,10 +35,10 @@ "use strict";

function getTemplateRegEx() {
const anything = '([\\s\\S]*?)';
const optionalNewLines = '\\n*';
const optionalWhitespace = '\\s*';
const spaceNotNewLines = `[ \t]*`;
const anything = String.raw `([\s\S]*?)`;
const optionalNewLines = String.raw `\n*`;
const optionalWhitespace = String.raw `\s*`;
const spaceNotNewLines = String.raw `[ \t]*`;
const tagStart = `{{${optionalWhitespace}`;
const tagEnd = `${optionalWhitespace}}}`;
const sectionStart = `${spaceNotNewLines}${tagStart}(?:#(.*?))${tagEnd}${optionalNewLines}`;
const sectionEnd = `${optionalWhitespace}${tagStart}\\/\\1${tagEnd}`;
const sectionEnd = String.raw `${optionalWhitespace}${tagStart}/\1${tagEnd}`;
const repeatingSectionTag = `${sectionStart}${anything}${sectionEnd}`;

@@ -45,0 +45,0 @@ const replacementTag = `${tagStart}(.*?)${tagEnd}`;

{
"name": "template-file",
"version": "5.0.1",
"version": "5.1.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "description": "🔀 Replace {{ variables }} in all your files",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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