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

percy

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

percy - npm Package Compare versions

Comparing version 3.0.3 to 5.0.0

index.js

36

package.json
{
"name": "percy",
"version": "3.0.3",
"description": "A persistance layer that plays nice with Couchbase",
"main": "percy.js",
"scripts": {
"test": "node ./tests"
},
"author": "Maurice Butler <maurice.butler@gmail.com>",
"version": "5.0.0",
"license": "MIT",
"dependencies": {
"kgo": "^1.3.0",
"map": "0.0.3"
},
"devDependencies": {
"tape": "^3.4.0"
},
"directories": {
"test": "tests"
},
"bin": "index.js",
"repository": {
"type": "git",
"url": "git://github.com/yoik/percy.git"
},
"bugs": {
"url": "https://github.com/yoik/percy/issues"
},
"homepage": "https://github.com/yoik/percy",
"keywords": [
"couchbase",
"persistance",
"layer",
"validate",
"validator",
"couch",
"base"
]
"url": "https://github.com/percy/cli"
}
}

@@ -1,34 +0,16 @@

# percy
## percy
A persistance layer that plays nice with couchbase@^2.0.0
Looking for [`@percy/cli`](https://github.com/percy/cli)?
## Usage
var Percy = require('percy'),
bucket, // bucket object from Couchbase
validator, // object that has a validate function with a signature of function(model, callback)
myCoolIdGenerator; // returns a unique id for this entity
This package is installed when somebody uses a package manager's exec command to
run `percy` without first installing `@percy/cli`. When run, it prints a message
to stderr informing the user that `@percy/cli` is not installed and then exits.
var persistance = new Percy('user', connection, validator);
To avoid accidentally installing this package when using a package manager's
exec command, most package managers accept the package's name:
// createId must be set so Percy knows how to generate unique ids
persistance.createId = function(callback){
callback(null, myCoolIdGenerator());
};
persistance.add({ userName: 'bob' }, function(error, user){
if(error){
console.log(error);
return;
}
console.log(user); // { id: 'myCoolId', userName: 'bob'}
});
// Results in the following db record
KEY VALUE
user:myCoolId {
id: 'myCoolId'
userName: 'bob'
}
``` session
$ npx @percy/cli --help
$ yarn dlx @percy/cli --help
$ pnpm dlx @percy/cli --help
```
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