upsert-envelope

1.0.0 • Public • Published

upsert-envelope

A tiny javascript envelope for an upsert (insert or update) operation results.

Installation

$ npm install upsert-envelope

Usage

var UpsertEnvelope = require( 'upsert-envelope' );
 
var resource = 'anything';
 
// udpated resource
var env = new UpsertEnvelope( resource );
console.log( 'resource: ' + env.resource );
console.log( 'inserted: ' + env.inserted );
 
// inserted resource
var env = new UpsertEnvelope( resource, true );
console.log( 'resource: ' + env.resource );
console.log( 'inserted: ' + env.inserted );
 

Readme

Keywords

Package Sidebar

Install

npm i upsert-envelope

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • cantireinnovations
  • jeff.ashton.ct