
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
bower-store
Advanced tools
Use bower.json as a config store.
Install with npm:
$ npm install bower-store --save
Inherits cache-base, please see the cache-base documentation for more details.
Pass the cwd and options to use, or an options object with cwd or path. If nothing is passed, the current working directory will be used.
var bower = require('bower-store')(cwd, options);
// or
var bower = require('bower-store')(options);
// or
var bower = require('bower-store')();
Example
var bower = require('bower-store')(process.cwd());
Inherits cache-base, please see the cache-base documentation for more details.
bower.set(key, value);
Set property key with the given value.
Example
bower.set('name', 'my-project');
console.log(bower.data);
//=> {"name": "my-project"}
console.log(bower.get('name'));
//=> "my-project"
Persist bower.json to the file system at bower.path.
bower.set('name', 'my-project');
bower.save();
bower.get(key);
Get property key from bower.json.
Example
// given {"name": "my-project"}
bower.set('bin.foo', 'bar');
console.log(bower.get('bin'));
//=> {"foo": "bar"}
bower.has(key);
Returns true if bower.json has property key.
Example
// given: {"name": "my-project"}
console.log(bower.has('name'));
//=> true
console.log(bower.has('zzzzzzz'));
//=> false
bower.union(key, val);
Create array key, or concatenate values to array key. Also uniquifies the array.
Example
bower.union('keywords', 'foo');
bower.union('keywords', ['bar', 'baz']);
console.log(bower.get('keywords'));
//=> ['foo', 'bar', 'baz']
console.log(bower.data);
//=> {keywords: ['foo', 'bar', 'baz']}
Delete the bower.json file at bower.path.
Example
bower.rm();
You might also be interested in these projects:
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Follow me on GitHub or Twitter for updates about bower-store and my other libraries:
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v, on April 07, 2016.
FAQs
Use bower.json as a config store.
We found that bower-store demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.