@reverse/string
Advanced tools
| export declare function plural(number: number, word: string): string; |
+0
-0
| export declare function capitalize(string: string): string; |
+0
-0
| export declare function format(format: string, ...variables: any[]): string; |
+1
-0
| export * from './capitalize'; | ||
| export * from './format'; | ||
| export * from './isValidEmail'; | ||
| export * from './plural'; |
| export declare function isValidEmail(email: string): boolean; |
+2
-3
| { | ||
| "name": "@reverse/string", | ||
| "version": "1.1.1", | ||
| "version": "1.1.2", | ||
| "description": "Useful functions for modifying and managing strings.", | ||
@@ -27,4 +27,3 @@ "main": "index.js", | ||
| "*.d.ts" | ||
| ], | ||
| "gitHead": "219934f44b4f4bb7f7122257edfc91d9f3b52753" | ||
| ] | ||
| } |
+23
-0
| # @reverse/string | ||
| > Useful functions for modifying and managing strings. | ||
| You can install with nodejs and npm | ||
| ``` | ||
@@ -10,2 +12,3 @@ npm i @reverse/string | ||
| ## Table of Contents | ||
| - [capitalize](#capitalizestring) | ||
@@ -16,6 +19,11 @@ - [format](#formatformat-variables) | ||
| ## capitalize(string) | ||
| > Capitalizes the first letter of a string. | ||
| ### Parameters | ||
| - `string: String`: The string to modify. | ||
| ### Example | ||
| ```js | ||
@@ -32,7 +40,12 @@ import { capitalize } from '@reverse/string'; | ||
| ## format(format, ...variables) | ||
| > Formats a string by substituting variables. | ||
| ### Parameters | ||
| - `format: String`: The string to format. | ||
| - `...variables: Any`: Any variables to substitute in the string. | ||
| ### Example | ||
| ```js | ||
@@ -49,6 +62,11 @@ import { format } from '@reverse/string'; | ||
| ## isValidEmail(email) | ||
| > Checks if a email is a valid formatted email. | ||
| ### Paramerters | ||
| - `email: String`: The email to check. | ||
| ### Example | ||
| ```js | ||
@@ -65,7 +83,12 @@ import { isValidEmail } from '@reverse/string'; | ||
| ## plural(number, word) | ||
| > Makes a word plural if the number is not one. | ||
| ### Parameters | ||
| - `number: number`: The amount of that object. | ||
| - `word: string`: The word to plural-ize. | ||
| ### Example | ||
| ```js | ||
@@ -72,0 +95,0 @@ import { plural } from '@reverse/string'; |
| {"version":3,"file":"capitalize.js","sourceRoot":"","sources":["capitalize.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC"} |
| {"version":3,"file":"format.js","sourceRoot":"","sources":["format.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,MAAM,CAAC,MAAc,EAAE,GAAG,SAAgB;IACxD,OAAO,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7F,CAAC"} |
| {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"} |
| {"version":3,"file":"isValidEmail.js","sourceRoot":"","sources":["isValidEmail.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,YAAY,CAAC,KAAa;IAExC,OAAO,CAAC,sJAAsJ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9K,CAAC"} |
-21
| MIT License | ||
| Copyright (c) 2019 Reverse Squared | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
35
6.06%101
29.49%3644
-34.65%8
-33.33%