New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stringman

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stringman - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

2

lib/lib/numbers.d.ts

@@ -8,2 +8,3 @@ declare function containsNum(num: string | number): boolean;

declare function convertToHex(num: string | number): string | null;
declare function isPhoneNumber(str: string | number): boolean;
declare const numbers: {

@@ -16,4 +17,5 @@ containsDecimal: typeof containsDecimal;

fraction: typeof fraction;
isPhoneNumber: typeof isPhoneNumber;
whole: typeof whole;
};
export { numbers };

@@ -47,2 +47,9 @@ "use strict";

}
function isPhoneNumber(str) {
if (typeof str !== 'string' && typeof str !== 'number') {
return false;
}
const test = typeof str === 'number' ? str.toString() : str;
return !!test.match(/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im);
}
const numbers = {

@@ -55,4 +62,5 @@ containsDecimal,

fraction,
isPhoneNumber,
whole
};
exports.numbers = numbers;

21

package.json
{
"name": "stringman",
"version": "0.4.0",
"description": "Stringman does a lot of the slightly unusual string manipulation and regex operations for you.",
"version": "0.4.1",
"description": "Stringman does a lot of string manipulation and regex operations for you.",
"main": "lib/index.js",

@@ -21,3 +21,3 @@ "types": "lib/index.d.ts",

"lint": "tslint -p tsconfig.json",
"docs": "rimraf ./docs && typedoc --out docs/ src/ && touch ./docs/.nojekyll"
"docs": "rimraf ./docs && typedoc --exclude src/index.ts --name Stringman --out docs/ src/ && touch ./docs/.nojekyll"
},

@@ -27,6 +27,12 @@ "keywords": [

"regex",
"string",
"manipulation"
"string manipulation",
"manipulation",
"colors",
"numbers"
],
"author": "Joey Gauthier",
"author": {
"name": "Joey Gauthier",
"email": "joey@joeyg.me",
"url": "https://joeyg.me"
},
"license": "ISC",

@@ -42,5 +48,4 @@ "devDependencies": {

"typedoc": "^0.15.0",
"typescript": "^3.6.3",
"uglify-es": "^3.3.9"
"typescript": "^3.6.3"
}
}
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