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

accountdown-parser

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accountdown-parser - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

readme.md

19

index.js
var extend = require('extend')
var formBody = require('body/any')
//var formBody = require('body/form')
module.exports = forms2accounts
module.exports = accountdown-parser
function forms2accounts (accountdown, opts) {
if (!(this instanceof forms2accounts)) {
return new forms2accounts(accountdown, opts)
function accountdown-parser (accountdown, opts) {
if (!(this instanceof accountdown-parser)) {
return new accountdown-parser(accountdown, opts)
}

@@ -29,3 +28,3 @@ if (!opts) opts = {};

forms2accounts.prototype.create = function (req, res, cb) {
accountdown-parser.prototype.create = function (req, res, cb) {
var self = this;

@@ -36,6 +35,6 @@

// { login: {...}, value: {key: .., ...} }
if (err) return console.log("forms2accounts: body did not parse:", err)
if (err) return console.log("accountdown-parser: body did not parse:", err)
if (self.format) body = self.format(body)
if (!self.validate(body))
return console.log("\nforms2accounts.create: invalid body: ", self.validate.errors)
return console.log("\naccountdown-parser.create: invalid body: ", self.validate.errors)

@@ -49,3 +48,3 @@ self.accountdown.create(body.value.key, body, function (err) {

forms2accounts.prototype.update = function (req, res, key, cb) {
accountdown-parser.prototype.update = function (req, res, key, cb) {
var self = this;

@@ -60,3 +59,3 @@ self.accountdown.get(key, function (err, existingAccountValue) {

if (!self.validate(body))
return console.log("\nforms2accounts.update: invalid body: ", self.validate.errors)
return console.log("\naccountdown-parser.update: invalid body: ", self.validate.errors)

@@ -63,0 +62,0 @@ // Overwrite all new values in existing account, and retain any values not

{
"name": "accountdown-parser",
"version": "0.1.1",
"version": "0.1.2",
"description": "Facilitates account creation and user input validation using accountdown and json-schema",

@@ -5,0 +5,0 @@ "main": "index.js",

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