node-nk-base
Advanced tools
Comparing version 2.0.5 to 2.0.6
22
index.js
@@ -79,5 +79,7 @@ function NKB(basefile) { | ||
section = String(section); | ||
let ss = bt.indexOf(`${section}`); | ||
if(ss === -1) return false; | ||
let se = bt.indexOf(`${section}`, ss) | ||
let se = bt.indexOf(`${section}`, ss+section.length+2); | ||
if(se !== -1) return true; else return false; | ||
@@ -92,5 +94,5 @@ | ||
if(ss === -1) return false; | ||
let se = bt.indexOf(`${section}`, ss); | ||
let se = bt.indexOf(`${section}`, ss+section.length+2); | ||
if(se === -1) return false; | ||
let ps = bt.indexOf(`${id}`, ss); | ||
let ps = bt.indexOf(`${id}`, ss+section.length+2); | ||
if(ps !== -1 && ps < se) return true; else return false; | ||
@@ -105,5 +107,5 @@ | ||
if(ss === -1) return false; | ||
let se = bt.indexOf(`${section}`, ss); | ||
let se = bt.indexOf(`${section}`, ss+section.length+2); | ||
if(se === -1) return false; | ||
let ps = bt.indexOf(`${id}`, ss); | ||
let ps = bt.indexOf(`${id}`, ss+section.length+2); | ||
if(ps === -1 || ps > se) return false; | ||
@@ -475,3 +477,3 @@ let pe = bt.indexOf(``, ps); | ||
} | ||
let se = bt.indexOf(`${section}`, ss); | ||
let se = bt.indexOf(`${section}`, ss+section.length+2); | ||
if(se === -1) { | ||
@@ -491,2 +493,4 @@ console.error(`node-nk-base deleteSection: Section "${section}" doesn't exists!`); | ||
section = String(section); | ||
if(!rb()) return null; | ||
@@ -524,3 +528,3 @@ | ||
} | ||
let se = bt.indexOf(`${section}`, ss); | ||
let se = bt.indexOf(`${section}`, ss+section.length+2); | ||
if(se === -1) { | ||
@@ -530,3 +534,3 @@ console.error(`node-nk-base createPart(section): This section(${section}) doesn't exists!`); | ||
} | ||
let ps = bt.indexOf(`${id}`, ss); | ||
let ps = bt.indexOf(`${id}`, ss+section.length+2); | ||
if(ps !== -1 && ps < se) { | ||
@@ -539,3 +543,3 @@ console.error(`node-nk-base createPart(id): Part with this id(${id}) already exists!`); | ||
let newbt = bt.substring(0, se) + `${id}`; | ||
let newbt = bt.substring(0, se) + `${id}`; | ||
@@ -542,0 +546,0 @@ for(var i = 0; i < vars.length; i++) { |
{ | ||
"name": "node-nk-base", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "database for nodejs by NK", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37340
758