You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
JavaScript
33 lines
1.0 KiB
JavaScript
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
import normalizeArguments from '../normalizeArguments.js';
|
|
import PhoneNumberMatcher from '../PhoneNumberMatcher.js';
|
|
/**
|
|
* @return ES6 `for ... of` iterator.
|
|
*/
|
|
|
|
export default function searchNumbers() {
|
|
var _normalizeArguments = normalizeArguments(arguments),
|
|
text = _normalizeArguments.text,
|
|
options = _normalizeArguments.options,
|
|
metadata = _normalizeArguments.metadata;
|
|
|
|
var matcher = new PhoneNumberMatcher(text, options, metadata);
|
|
return _defineProperty({}, Symbol.iterator, function () {
|
|
return {
|
|
next: function next() {
|
|
if (matcher.hasNext()) {
|
|
return {
|
|
done: false,
|
|
value: matcher.next()
|
|
};
|
|
}
|
|
|
|
return {
|
|
done: true
|
|
};
|
|
}
|
|
};
|
|
});
|
|
}
|
|
//# sourceMappingURL=searchNumbers.js.map
|