Comparing version 0.4.1 to 0.5.0
10
ideas.md
@@ -10,7 +10,7 @@ # Ideas | ||
## numbers | ||
## escapes | ||
- is whole number | ||
- is decimal | ||
- contains number | ||
- remove escapes | ||
- add escapes | ||
- retrieve escaped characters | ||
@@ -27,6 +27,4 @@ ## IP Address | ||
## Phone Numbers | ||
## File Path | ||
## Zipcode |
@@ -1,8 +0,8 @@ | ||
import { colors } from './lib/colors'; | ||
import { email } from './lib/email'; | ||
import { numbers } from './lib/numbers'; | ||
import { parens } from './lib/parens'; | ||
import { pwd } from './lib/password'; | ||
import { semver } from './lib/semver'; | ||
import { url } from './lib/url'; | ||
import { colors } from './source/colors'; | ||
import { email } from './source/email'; | ||
import { numbers } from './source/numbers'; | ||
import { parens } from './source/parens'; | ||
import { pwd } from './source/password'; | ||
import { semver } from './source/semver'; | ||
import { url } from './source/url'; | ||
export { colors, email, numbers, parens, pwd, semver, url }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const colors_1 = require("./lib/colors"); | ||
const colors_1 = require("./source/colors"); | ||
exports.colors = colors_1.colors; | ||
const email_1 = require("./lib/email"); | ||
const email_1 = require("./source/email"); | ||
exports.email = email_1.email; | ||
const numbers_1 = require("./lib/numbers"); | ||
const numbers_1 = require("./source/numbers"); | ||
exports.numbers = numbers_1.numbers; | ||
const parens_1 = require("./lib/parens"); | ||
const parens_1 = require("./source/parens"); | ||
exports.parens = parens_1.parens; | ||
const password_1 = require("./lib/password"); | ||
const password_1 = require("./source/password"); | ||
exports.pwd = password_1.pwd; | ||
const semver_1 = require("./lib/semver"); | ||
const semver_1 = require("./source/semver"); | ||
exports.semver = semver_1.semver; | ||
const url_1 = require("./lib/url"); | ||
const url_1 = require("./source/url"); | ||
exports.url = url_1.url; |
{ | ||
"name": "stringman", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "Stringman does a lot of string manipulation and regex operations for you.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -29,1 +29,57 @@ # Stringman | ||
I haven't though too much about this yet as the project is very young. Just contact me if you are interested in contributing. | ||
## Functionality | ||
Stringman is written in modules with a variety of functionality and that can be imported individually. See the documentation for more details and usage examples. | ||
#### colors module | ||
- rgbToHex => Takes rgb color values and returns hexidecimal equivalent | ||
- isHex => Takes a string and returns boolean indicating whether it is a valid hexidecimal color | ||
- hexToRgb => Takes a hexidecimal color string and returns the rgb value | ||
#### email module | ||
- retrieve => Takes a string and returns a valid email address if one is present in the string | ||
- isValid => Takes a string and returns boolean to represent whether or not string is a valid email address | ||
- remove => Takes a string and returns the string with any email addresses removed | ||
- swap => Takes 2 strings (a string with an email address and another string that is a different email address) and returns the first string with the new address swapped | ||
#### numbers module | ||
- containsNum => returns boolean indicating whether argument contains a number | ||
- whole => Takes a string or a number and returns boolean for whether it is a valid whole number (integer) | ||
- decimal => Takes a string or a number and returns a boolean for whether it is a valid decimal (float) | ||
- fraction => Takes a string and returns a boolean for whether it is a valid fraction. | ||
- containsDecimal => Takes a string and returns boolean indicating whether string contains a decimal (float) somwhere in it | ||
- containsFraction => Takes a string and returns a boolean indicating whether the string contains a fraction | ||
- convertToHex => Takes a number as a string or number form and returns the hexidecimal equivalent | ||
- isPhoneNumber => Takes a string or number and validates whether it is a valid phone number format. | ||
#### parens module | ||
- remove => Takes string and returns string with parenthesis and contain between parenthesis removed | ||
- inside => Takes string and returns array of strings containing what was inside any number of sets of parenthesis | ||
#### password module | ||
- buildRegex => Takes min, max, and string of special characters and returns a RegExp for validating passwords | ||
- isValid => Takes parameters for building a regular expression then validates the string sent and returns a boolean value | ||
- isValidAdvanced => Validates using regex like isValid but also checks for specific number of different types of characters (slightly slower than 'isValid') | ||
#### semver module | ||
NOTE: This module uses look-behinds right now so it will not work in IE, Edge, and older versions of other browsers. I plan on revisiting this module to see if the same functionality can be achieved without this restriction. | ||
- retrieve => returns semantic version from string if present | ||
- isValid => Tests if argument is valid semantic version | ||
- remove => Removes semantic version from string, trims, and returns result | ||
- expression => Returns RegExp variable used to test for semantic version | ||
#### url module | ||
- retrieve => Takes string and returns any matches for a valid URL from the string | ||
- isValid => Takes a string and returns whether string is a valid URL as a boolean | ||
- remove => Takes string, removes any URLs, trims, and returns string | ||
- getDomain => Takes url string, tries to return just the domain | ||
- expression => Returns RegExp for testing URLs |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
19048
403
85
1