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

uuid-regexp

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

uuid-regexp - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

4

changelog.md
# Change Log
All notable changes to this project will be documented in this file (keepachangelog.com).
## 0.3.0 - 2016-01-14
### Changed
- Dropped global option in favor of general `flags` option.
## 0.2.0 - 2016-01-14

@@ -5,0 +9,0 @@ ### Added

10

index.js

@@ -22,4 +22,4 @@ 'use strict'

*
* @param {Boolean} [opts.global]
* Whether the RegExp should test against all possible matches in a string, or only against the first.
* @param {String} [opts.flags]
* Additional RegExp flags ('i' is always set).
*

@@ -34,6 +34,8 @@ * @param {Boolean} [opts.nil]

function re (opts) {
opts = opts || {}
return new RegExp(
format('\\b(?:%s)\\b', regexp.versioned.source + ((opts || {}).nil ? '|' + regexp.nil.source : '')),
(opts || {}).global ? 'gi' : 'i'
format('\\b(?:%s)\\b', regexp.versioned.source + (opts.nil ? '|' + regexp.nil.source : '')),
'i' + (opts.flags || '')
)
}
{
"name": "uuid-regexp",
"description": "RegExp for finding an RFC4122 compliant UUID in a string.",
"version": "0.2.0",
"version": "0.3.0",
"author": "Wil Moore III <wil.moore@wilmoore.com>",

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

@@ -41,3 +41,3 @@ # uuid-regexp

'Secret UUID is: {4d36e96e-e325-11ce-bfc1-08002be10318}'.replace(uuid({ global: true }), '*****')
'Secret UUID is: {4d36e96e-e325-11ce-bfc1-08002be10318}'.replace(uuid({ flags: 'g' }), '*****')
//=> 'Secret UUID is: {*****}'

@@ -65,3 +65,3 @@ ```

- `options.nil (Boolean)` Whether to include the nil/empty UUID pattern. (default: `false`)
- `options.global (Boolean)` Whether the RegExp should test against all possible matches in a string, or only against the first.
- `options.flags (String)` Additional RegExp flags ('i' is always set).

@@ -68,0 +68,0 @@ ###### returns

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