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

machinepack-strings

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack-strings - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

32

machines/replace.js

@@ -48,4 +48,24 @@ module.exports = {

defaultsTo: true
},
global: {
friendlyName: 'Replace all?',
description: 'Whether or not to replace all substrings that match the regular expression, or just the first.',
extendedDescription: 'This will build the regular expression using the `/g` modifier.',
example: true,
advanced: true,
defaultsTo: false
},
multiline: {
friendlyName: 'Multiline?',
description: 'Whether to treat beginning and end characters (^ and $) as matching each line delimited by \\n or \\r.',
extendedDescription: 'This will build the regular expression using the `/m` modifier.',
example: true,
advanced: true,
defaultsTo: false
}
},

@@ -95,5 +115,15 @@

// (and if relevant, enable case-insensitivity)
var modifiers = '';
if (inputs.caseInsensitive) {
regexp = new RegExp(regexp, 'i');
modifiers += 'i';
}
if (inputs.global) {
modifiers += 'g';
}
if (inputs.multiline) {
modifiers += 'm';
}
if (modifiers.length) {
regexp = new RegExp(regexp, modifiers);
}
else {

@@ -100,0 +130,0 @@ regexp = new RegExp(regexp);

2

package.json
{
"name": "machinepack-strings",
"version": "5.0.0",
"version": "5.1.0",
"description": "Work with strings.",

@@ -5,0 +5,0 @@ "scripts": {

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