Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/inventory.picotech.app/public_html/node_modules/jsbarcode/src/barcodes/ITF/ drwxr-xr-x |
Viewing file: Select action/file-type: import { START_BIN, END_BIN, BINARIES } from './constants'; import Barcode from '../Barcode'; class ITF extends Barcode { valid() { return this.data.search(/^([0-9]{2})+$/) !== -1; } encode() { // Calculate all the digit pairs const encoded = this.data .match(/.{2}/g) .map(pair => this.encodePair(pair)) .join(''); return { data: START_BIN + encoded + END_BIN, text: this.text }; } // Calculate the data of a number pair encodePair(pair) { const second = BINARIES[pair[1]]; return BINARIES[pair[0]] .split('') .map((first, idx) => ( (first === '1' ? '111' : '1') + (second[idx] === '1' ? '000' : '0') )) .join(''); } } export default ITF; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0034 ]-- |