forked from enviPath/enviPy
Current Dev State
This commit is contained in:
15
static/js/ketcher2/node_modules/dot-parts/index.js
generated
vendored
Normal file
15
static/js/ketcher2/node_modules/dot-parts/index.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = function dotParts (path) {
|
||||
var result = []
|
||||
var parts = path.split('.')
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var part = parts[i]
|
||||
while (part[part.length - 1] === '\\') {
|
||||
part = part.slice(0, -1) + '.'
|
||||
part += parts[++i]
|
||||
}
|
||||
result.push(part)
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user