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

no-regex-utils

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

no-regex-utils - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

4

dist/index.d.ts
import { onlyLetters, onlyNumbers } from "./manipulations";
import { isEmail, isIPv4, isUrl, isUsername } from "./validations";
export { isEmail, isIPv4, isUsername, onlyNumbers, onlyLetters, isUrl };
import { isEmail, isIPv4, isIPv6, isUrl, isUsername } from "./validations";
export { isEmail, isIPv4, isIPv6, isUrl, isUsername, onlyLetters, onlyNumbers };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUrl = exports.onlyLetters = exports.onlyNumbers = exports.isUsername = exports.isIPv4 = exports.isEmail = void 0;
exports.onlyNumbers = exports.onlyLetters = exports.isUsername = exports.isUrl = exports.isIPv6 = exports.isIPv4 = exports.isEmail = void 0;
const manipulations_1 = require("./manipulations");

@@ -10,3 +10,4 @@ Object.defineProperty(exports, "onlyLetters", { enumerable: true, get: function () { return manipulations_1.onlyLetters; } });

Object.defineProperty(exports, "isIPv4", { enumerable: true, get: function () { return validations_1.isIPv4; } });
Object.defineProperty(exports, "isIPv6", { enumerable: true, get: function () { return validations_1.isIPv6; } });
Object.defineProperty(exports, "isUrl", { enumerable: true, get: function () { return validations_1.isUrl; } });
Object.defineProperty(exports, "isUsername", { enumerable: true, get: function () { return validations_1.isUsername; } });
export declare const isEmail: (value: string) => boolean;
export declare const isIPv4: (value: string) => boolean;
export declare const isIPv6: (value: string) => boolean;
export declare const isUrl: (value: string) => boolean;

@@ -4,0 +5,0 @@ export interface IIsUsernameOptions {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUsername = exports.isUrl = exports.isIPv4 = exports.isEmail = void 0;
exports.isUsername = exports.isUrl = exports.isIPv6 = exports.isIPv4 = exports.isEmail = void 0;
const testRegex = (regex, value) => {

@@ -15,2 +15,6 @@ return new RegExp(regex).test(value);

exports.isIPv4 = isIPv4;
const isIPv6 = (value) => {
return testRegex(/^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/, value);
};
exports.isIPv6 = isIPv6;
const isUrl = (value) => {

@@ -17,0 +21,0 @@ return testRegex(/^(?:http|https|ftp|mailto|file|data|irc|ws|wss):\/\/[A-Za-z0-9\-]{0,63}(\.[A-Za-z0-9\-]{0,63})+(:\d{1,4})?\/*(\/*[A-Za-z0-9\-._]+\/*)*(\?.*)?(#.*)?/, value);

{
"name": "no-regex-utils",
"version": "0.6.0",
"version": "0.7.0",
"description": "No Regex Utils - Common regex functions",

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

@@ -31,2 +31,8 @@ # NO Regex Utils

> isIPv6
```javascript
NoRegex.isIPv6("2001:0db8:85a3:0000:0000:8a2e:0370:7334"); // true
```
> isUsername

@@ -33,0 +39,0 @@

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