📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
rentacarv1.demodesign.com.tr
/
trex
/
assets
/
lib
/
formatter
/
common
📝
pattern.js
← Geri Dön
/* * pattern.js * * Utilities to parse str pattern and return info * */ // Define module var pattern = {}; // Match information var DELIM_SIZE = 4; // Our regex used to parse var regexp = new RegExp('{{([^}]+)}}', 'g'); // // Helper method to parse pattern str // var getMatches = function (pattern) { // Populate array of matches var matches = [], match; while(match = regexp.exec(pattern)) { matches.push(match); } return matches; }; // // Create an object holding all formatted characters // with corresponding positions // pattern.parse = function (pattern) { // Our obj to populate var info = { inpts: {}, chars: {} }; // Pattern information var matches = getMatches(pattern), pLength = pattern.length; // Counters var mCount = 0, iCount = 0, i = 0; // Add inpts, move to end of match, and process var processMatch = function (val) { var valLength = val.length; for (var j = 0; j < valLength; j++) { info.inpts[iCount] = val.charAt(j); iCount++; } mCount ++; i += (val.length + DELIM_SIZE - 1); }; // Process match or add chars for (i; i < pLength; i++) { if (mCount < matches.length && i === matches[mCount].index) { processMatch(matches[mCount][1]); } else { info.chars[i - (mCount * DELIM_SIZE)] = pattern.charAt(i); } } // Set mLength and return info.mLength = i - (mCount * DELIM_SIZE); return info; }; // Expose module.exports = pattern;
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula