Comments (6)
From looking at the code, it seems not. Though changing that would be easy. If you remove the parentheses on the last line, you can pass them as parameters to the initialize function. That means you have to initialize it, though.
//UNTESTED
var awsS3Promisified = {
initialize: function(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) {
...
};
module.exports = awsS3Promisified.initialize; <<<<< like this
You may need to remove the parameters as well, in case there are conflicts.
from awss3promisified.
Great thanks!
from awss3promisified.
Hi @mrn3 - I just made a little update to make this easier. You should now be able to do:
var aws = require('aws-s3-promisified').initialize(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY);
from awss3promisified.
@alliejanoch I think you have a typo in that example. Shouldn't it be...
var aws = require('aws-s3-promisified').initialize(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY);
Also, I think what @ssaunders makes sense. It would be a little nicer to not have to explicitly call initialize. This would be a breaking change to the API though.
var aws = require('aws-s3-promisified')(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY);
from awss3promisified.
@mrn3 - I've released a new version of the library. This will break code that worked with previous versions. You can now initialize like this:
var aws = require('aws-s3-promisified')({
accessKeyId: AWS_ACCESS_KEY_ID,
secretAccessKey: AWS_SECRET_ACCESS_KEY
});
from awss3promisified.
Great thanks!
from awss3promisified.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awss3promisified.