cherry3-lite
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -11,3 +11,3 @@ /** | ||
* @example const db = require('cherry3').default; | ||
* @example const { set, get, fetch, delete, has, add, sub, inc, dec, all, fetchAll, push, pull } = require('cherry3'); | ||
* @example const { set, get, fetch, remove, has, add, sub, inc, dec, all, fetchAll, push, pull } = require('cherry3-lite'); | ||
* @async | ||
@@ -160,8 +160,8 @@ */ | ||
* @description This function deletes a key | ||
* @example await db.delete('test'); | ||
* @example db.delete('test').then(data => console.log(data)); | ||
* @example db.delete('test').catch(error => console.log(error)); | ||
* @example await db.remove('test'); | ||
* @example db.remove('test').then(data => console.log(data)); | ||
* @example db.remove('test').catch(error => console.log(error)); | ||
* @returns {Promise<Boolean>} | ||
*/ | ||
function deleteAs(key: string): Promise<boolean>; | ||
function remove(key: string): Promise<boolean>; | ||
@@ -168,0 +168,0 @@ /** |
10
index.js
@@ -14,3 +14,3 @@ "use strict"; | ||
* @example const db = require('cherry3').default; | ||
* @example const { set, get, fetch, delete, has, add, sub, inc, dec, all, fetchAll, push, pull } = require('cherry3'); | ||
* @example const { set, get, fetch, remove, has, add, sub, inc, dec, all, fetchAll, push, pull } = require('cherry3-lite'); | ||
* @async | ||
@@ -127,8 +127,8 @@ */ | ||
* @description This function deletes a key | ||
* @example await db.delete('test'); | ||
* @example db.delete('test').then(data => console.log(data)); | ||
* @example db.delete('test').catch(error => console.log(error)); | ||
* @example await db.remove('test'); | ||
* @example db.remove('test').then(data => console.log(data)); | ||
* @example db.remove('test').catch(error => console.log(error)); | ||
* @returns {Promise<Boolean>} | ||
*/ | ||
delete: async function (key) { | ||
remove: async function (key) { | ||
if (!key) throw new CherryError('key is required', 'error'); | ||
@@ -135,0 +135,0 @@ if (typeof key !== 'string') throw new CherryError('key must be a string', 'error'); |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://fivesobes.gitbook.io/cherry3/", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"author": { | ||
@@ -8,0 +8,0 @@ "name": "Bes-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
103771