Quick start
Quick start
npm i stampitconst stampit = require('stampit')
let Stamp = stampit() // creates new stampconst HasLog = require('./HasLog')
Stamp = Stamp.compose(HasLog) // creates a new stamp composed from the twoStamp = Stamp.props({ // creates a new derived stamp
S3: require('aws-sdk').S3
})Stamp = Stamp.init(function ({ bucket }, { stamp }) { // creates a new derived stamp
this.s3instance = new this.S3({
apiVersion: '2006-03-01',
params: { Bucket: bucket || stamp.compose.configuration.bucket } // using configuration.bucket, see below
})
})Shorter API
Using the stamp
Mocking I/O in unit tests
Basic API
Last updated