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

cli-placeholders

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-placeholders - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

26

index.js

@@ -87,3 +87,3 @@ const assert = require('assert')

const placeholders = template.match(/\{(.*?)\}/g)
const placeholders = template.match(/\{(.*?)\}/g) || []

@@ -150,2 +150,10 @@ this._placeholders = []

get summary () {
return {
template: this._template,
text: this.text,
results: this.results
}
}
render () {

@@ -188,2 +196,7 @@ let offset = 0

if (!this._placeholders.length) {
this.rl.close()
return this.summary
}
return new Promise((resolve) => {

@@ -198,8 +211,3 @@ process.stdin.on('keypress', async (character = '', key) => {

this.rl.close()
return resolve({
template: this._template,
text: this.text,
results: this.results
})
return resolve(this.summary)
}

@@ -221,3 +229,3 @@

this.render()
const command = this._commands[placeholder.value]

@@ -245,3 +253,3 @@ if (command) {

module.exports = async (template, options) => {
return await new Template(template, options).getValues()
return await new Template(template, options).getValues()
}
{
"name": "cli-placeholders",
"version": "1.0.0",
"version": "1.0.1",
"description": "Get user input by extracting data from textual placeholders using the CLI",

@@ -5,0 +5,0 @@ "main": "index.js",

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