BLUE
PHP 7.4.33
Path:
/var/www/cookieconsent.bitkit.dk/httpdocs/node_modules/safe-identifier
Run
Logout
Edit File
Size: 866 B
Close
/var/www/cookieconsent.bitkit.dk/httpdocs/node_modules/safe-identifier/index.js
Text
Base64
const reserved = require('./reserved.js') // from https://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/ function hashCode(str) { let hash = 0 for (let i = 0; i < str.length; ++i) { const char = str.charCodeAt(i) hash = (hash << 5) - hash + char hash |= 0 // Convert to 32bit integer } return hash } function identifier(key, unique) { if (unique) key += ' ' + hashCode(key).toString(36) const id = key.trim().replace(/\W+/g, '_') return reserved.ES3[id] || reserved.ESnext[id] || /^\d/.test(id) ? '_' + id : id } function property(obj, key) { if (/^[A-Z_$][0-9A-Z_$]*$/i.test(key) && !reserved.ES3[key]) { return obj ? obj + '.' + key : key } else { const jkey = JSON.stringify(key) return obj ? obj + '[' + jkey + ']' : jkey } } module.exports = { identifier, property }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
index.d.ts
792 B
lrw-r--r--
2025-06-16 05:45:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
866 B
lrw-r--r--
2025-06-16 05:45:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.mjs
832 B
lrw-r--r--
2025-06-16 05:45:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
750 B
lrw-r--r--
2025-06-16 05:45:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
862 B
lrw-r--r--
2025-06-16 05:45:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
1.38 KB
lrw-r--r--
2025-06-16 05:45:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
reserved.js
808 B
lrw-r--r--
2025-06-16 05:45:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).