Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliytv committed Sep 29, 2023
1 parent a69fc0f commit a399978
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions npm/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
{
"name": "@nitra/parse-phone",
"version": "1.1.0",
"version": "1.1.1",
"description": "make world phone number (Ru, Ukr)",
"type": "module",
"exports": {
"import": "./src/index.mjs"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nitra/parse-phone.git"
},
"engines": {
"node": ">=10.0.0"
"node": ">=18.0.0"
},
"files": [
"src"
Expand Down
6 changes: 3 additions & 3 deletions npm/src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* Перетворення номера на міжнародний формат
*
* @param {String} phone
* @return {String} Телефон у міжнародному форматі або null якщо не розпізнано
* @return {String|null} Телефон у міжнародному форматі або null якщо не розпізнано
*/
export const parsePhone = phone => {
if (!phone) {
return ''
return null
}

/** @type {String} */
Expand Down Expand Up @@ -49,5 +49,5 @@ export const parsePhone = phone => {
}

// Не вдалось розпізнати номер
return ''
return null
}

0 comments on commit a399978

Please sign in to comment.