HEX
Server: Apache/2.4.65 (Debian)
System: Linux srv39710 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.4.11
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: //opt/bitninja-dispatcher/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.test.js
import parseIncompletePhoneNumber, { parsePhoneNumberCharacter } from './parseIncompletePhoneNumber.js';
describe('parseIncompletePhoneNumber', function () {
  it('should parse phone number character', function () {
    // Accepts leading `+`.
    parsePhoneNumberCharacter('+').should.equal('+'); // Doesn't accept non-leading `+`.

    expect(parsePhoneNumberCharacter('+', '+')).to.be.undefined; // Parses digits.

    parsePhoneNumberCharacter('1').should.equal('1'); // Parses non-European digits.

    parsePhoneNumberCharacter('٤').should.equal('4'); // Dismisses other characters.

    expect(parsePhoneNumberCharacter('-')).to.be.undefined;
  });
  it('should parse incomplete phone number', function () {
    parseIncompletePhoneNumber('').should.equal(''); // Doesn't accept non-leading `+`.

    parseIncompletePhoneNumber('++').should.equal('+'); // Accepts leading `+`.

    parseIncompletePhoneNumber('+7 800 555').should.equal('+7800555'); // Parses digits.

    parseIncompletePhoneNumber('8 (800) 555').should.equal('8800555'); // Parses non-European digits.

    parseIncompletePhoneNumber('+٤٤٢٣٢٣٢٣٤').should.equal('+442323234');
  });
});
//# sourceMappingURL=parseIncompletePhoneNumber.test.js.map