Gathering detailed insights and metrics for balena-settings-storage
Gathering detailed insights and metrics for balena-settings-storage
Gathering detailed insights and metrics for balena-settings-storage
Gathering detailed insights and metrics for balena-settings-storage
npm install balena-settings-storage
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (97.91%)
JavaScript (2.09%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
4 Stars
118 Commits
2 Forks
2 Watchers
4 Branches
11 Contributors
Updated on Feb 21, 2023
Latest Version
8.1.0
Package Id
balena-settings-storage@8.1.0
Unpacked Size
76.61 kB
Size
21.61 kB
File Count
42
NPM Version
9.6.7
Node Version
18.17.0
Published on
Jul 28, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Balena settings storage utilities.
The intention of this module is to provide low level access to how balena persists settings in both the filesystem and the browser.
THIS MODULE IS LOW LEVEL AND IS NOT MEANT TO BE USED BY END USERS DIRECTLY.
Unless you know what you're doing, use the balena SDK instead.
Install balena-settings-storage
by running:
1$ npm install --save balena-settings-storage
storage
Promise
[ 'Promise' ].<*>
[ 'Promise' ].<Boolean>
Promise
Promise
storage
Kind: static method of storage
Summary: Get an instance of storage module
Access: public
Param | Type | Description |
---|---|---|
options | Object | options |
[options.dataDirectory] | String | False | the directory to use for storage in Node.js or false to create an isolated in memory instance. Values other than false are ignored in the browser. |
Example
1// with es6 imports 2import { getStorage } from 'balena-settings-storage'; 3// or with node require 4const { getStorage } = require('balena-settings-storage'); 5 6const storage = getStorage({ 7 dataDirectory: '/opt/cache/balena' 8});
storage
Promise
[ 'Promise' ].<*>
[ 'Promise' ].<Boolean>
Promise
Promise
Promise
Kind: inner method of getStorage
Summary: Set a value
Access: public
Param | Type | Description |
---|---|---|
name | String | name |
value | * | value |
Example
1storage.set('token', '1234')
[ 'Promise' ].<*>
Kind: inner method of getStorage
Summary: Get a value
Returns: [ 'Promise' ].<*>
- value or undefined
Access: public
Param | Type | Description |
---|---|---|
name | String | name |
Example
1storage.get('token').then((token) => { 2 console.log(token) 3});
[ 'Promise' ].<Boolean>
Kind: inner method of getStorage
Summary: Check if the value exists
Returns: [ 'Promise' ].<Boolean>
- has value
Access: public
Param | Type | Description |
---|---|---|
name | String | name |
Example
1storage.has('token').then((hasToken) => { 2 if (hasToken) { 3 console.log('Yes') 4 } else { 5 console.log('No') 6});
Promise
Kind: inner method of getStorage
Summary: Remove a value
Access: public
Param | Type | Description |
---|---|---|
name | String | name |
Example
1storage.remove('token')
Promise
Kind: inner method of getStorage
Summary: Remove all values
Access: public
Example
1storage.clear()
If you're having any problem, please raise an issue on GitHub and the balena team will be happy to help.
Run the test suite by doing:
1$ npm test
Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:
1$ npm run lint
The project is licensed under the Apache 2.0 license.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 4/14 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More