node-ainzfb-new 1.6.2911-test → 1.7.1-beta
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2 -0
- package/Extra/Database/test/test.js +23 -0
- package/Extra/PM2/ecosystem.config.js +1 -1
- package/index-backup.js +1089 -0
- package/index.js +14 -17
- package/package.json +5 -4
- package/src/changeAvt.js +73 -73
- package/src/getAccessToken.js +21 -21
- package/src/getThreadInfo.js +18 -3423
- package/src/getUserInfoV2.js +22 -19
- package/test/data/shareAttach.js +146 -0
- package/test/data/something.mov +0 -0
- package/test/data/test.png +0 -0
- package/test/data/test.txt +7 -0
- package/test/example-config.json +18 -0
- package/test/test-page.js +140 -0
- package/test/test.js +385 -0
- package/test/testv2.js +3 -0
- package/utils.js +38 -18
- package/.gitattributes +0 -2
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/nodejs.yml +0 -26
- package/.github/workflows/npmpublish.yml +0 -30
package/CHANGELOG.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
const db = require('../index');
|
2
|
+
|
3
|
+
// Setting an object in the database:
|
4
|
+
db.set('userInfo', { difficulty: 'Easy' })
|
5
|
+
// -> { difficulty: 'Easy' }
|
6
|
+
|
7
|
+
// Pushing an element to an array (that doesn't exist yet) in an object:
|
8
|
+
db.push('userInfo.items', 'Sword')
|
9
|
+
// -> { difficulty: 'Easy', items: ['Sword'] }
|
10
|
+
|
11
|
+
// Adding to a number (that doesn't exist yet) in an object:
|
12
|
+
db.add('userInfo.balance', 500)
|
13
|
+
// -> { difficulty: 'Easy', items: ['Sword'], balance: 500 }
|
14
|
+
|
15
|
+
// Repeating previous examples:
|
16
|
+
db.push('userInfo.items', 'Watch')
|
17
|
+
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 500 }
|
18
|
+
db.add('userInfo.balance', 500)
|
19
|
+
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 1000 }
|
20
|
+
|
21
|
+
// Fetching individual properties
|
22
|
+
console.log(db.get('userInfo.balance')) // -> 1000
|
23
|
+
console.log(db.get('userInfo.items')) // ['Sword', 'Watch']
|