Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-nk-base

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-nk-base - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

126

index.js

@@ -402,2 +402,20 @@ function NKB(basefile) {

}
this.isPart = function(id) {
if(!rb()) return null;
if(!is_section(section)) return null;
return is_part(section, id);
}
this.isVariable = function(id, variable) {
if(!rb()) return null;
if(!is_section(section)) return null;
if(!is_part(section, id)) return null
return is_variable(section, id, variable);
}

@@ -500,2 +518,100 @@

this.get = function(id, variable) {
if(!rb()) return null;
if(!is_section(section)) {
console.error(`node-nk-base get(section): This section(${section}) doesn't exists!`);
return null;
}
if(!is_part(section, id)) {
console.error(`node-nk-base get(id): Part with this id(${id}) doesn't exists!`);
return null;
}
if(!is_variable(section, id, variable)) {
console.error(`node-nk-base get(variable): This variable(${variable}) doesn't exists!`);
return null;
}
return get(section, id, variable);
}
this.set = function(id, variable, value) {
if(!rb()) return null;
if(!is_section(section)) {
console.error(`node-nk-base set(section): This section(${section}) doesn't exists!`);
return null;
}
if(!is_part(section, id)) {
console.error(`node-nk-base set(id): Part with this id(${id}) doesn't exists!`);
return null;
}
if(!is_variable(section, id, variable)) {
console.error(`node-nk-base set(variable): This variable(${variable}) doesn't exists!`);
return null;
}
return set(section, id, variable, value);
}
this.add = function(id, variable, value) {
if(!rb()) return null;
if(!is_section(section)) {
console.error(`node-nk-base add(section): This section(${section}) doesn't exists!`);
return null;
}
if(!is_part(section, id)) {
console.error(`node-nk-base add(id): Part with this id(${id}) doesn't exists!`);
return null;
}
if(!is_variable(section, id, variable)) {
console.error(`node-nk-base add(variable): This variable(${variable}) doesn't exists!`);
return null;
}
return add(section, id, variable, value);
}
this.append = function(id, variable, value) {
if(!rb()) return null;
if(!is_section(section)) {
console.error(`node-nk-base append(section): This section(${section}) doesn't exists!`);
return null;
}
if(!is_part(section, id)) {
console.error(`node-nk-base append(id): Part with this id(${id}) doesn't exists!`);
return null;
}
if(!is_variable(section, id, variable)) {
console.error(`node-nk-base append(variable): This variable(${variable}) doesn't exists!`);
return null;
}
return append(section, id, variable, value);
}
this.findPart = function(id) {

@@ -517,2 +633,12 @@

this.isVariable = function(variable) {
if(!rb()) return null;
if(!is_section(section)) return null;
if(!is_part(section, id)) return null
return is_variable(section, id, variable);
}
this.get = function(variable) {

@@ -519,0 +645,0 @@

2

package.json
{
"name": "node-nk-base",
"version": "1.0.8",
"version": "1.0.9",
"description": "database for nodejs by NK",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc