UNPKG

huawei-wingle-4g

Version:

This is a module NodeJS allowing to drive Huawei Wingle 4G. This module can :

26 lines 848 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toTwo = exports.substringAfter = exports.substringBefore = void 0; function substringBefore(text, search, isLast = false) { const position = isLast ? text.lastIndexOf(search) : text.indexOf(search); return position < 0 ? text : text.substr(0, position); } exports.substringBefore = substringBefore; function substringAfter(text, search, isLast = false) { const position = isLast ? text.lastIndexOf(search) : text.indexOf(search); return position < 0 ? '' : text.substring(position + search.length); } exports.substringAfter = substringAfter; function toTwo(number) { return number < 9 ? `0${number}` : `${number}`; } exports.toTwo = toTwo; //# sourceMappingURL=StringUtils.js.map