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

1password-js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

1password-js

1Password Vault Handling in Javascript

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

1password.js

1password.js is a library to process 1password Vaults.

Installation

You can install via npm:

> npm install 1password-js

Usage

1password.js exposes a class that is instantiated with the vault master password and optionally, the profile name, and can be searched with the search method:

const Vault = require('1password-js');

// Somehow we get the master password...

const vault = new Vault(masterPassword);

// Or, supplying a profile name:

const vault = new Vault(masterPassword, 'my-special-profile');

// Searching in the Vault
// `.search` return a Promise that will resolve to the item detail(s)
// or reject
vault.search('Github').then(items => {
	// The search may have multiple entries
	const password = items[0].itemDetail.fields.find(field => field.designation === 'password').value;
}).catch(() => {
	// There wasn't anything found with that title
})

Notes

This only currently works on Mac. If you have the location of the vault sqlite database on other systems, create an issue and I'll add it!

License

MIT

FAQs

Package last updated on 15 Aug 2016

Did you know?

Socket

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.

Install

Related posts

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