alexa-response
Advanced tools
Comparing version 4.2.8 to 4.2.9
@@ -11,4 +11,2 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _class; | ||
@@ -30,4 +28,4 @@ var _temp; | ||
say(text, type) { | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
shouldEndSession: true | ||
@@ -39,5 +37,5 @@ }, outputSpeech(text, type)) | ||
reprompt(text, type) { | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
reprompt: _extends({}, outputSpeech(text, type)) | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
reprompt: Object.assign({}, outputSpeech(text, type)) | ||
}) | ||
@@ -51,5 +49,5 @@ })); | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
card: _extends({}, rest, type && { type }) | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
card: Object.assign({}, rest, type && { type }) | ||
}) | ||
@@ -60,4 +58,4 @@ })); | ||
attributes(data) { | ||
return new Response(_extends({}, this.state, { | ||
sessionAttributes: _extends({}, this.state.sessionAttributes, data) | ||
return new Response(Object.assign({}, this.state, { | ||
sessionAttributes: Object.assign({}, this.state.sessionAttributes, data) | ||
})); | ||
@@ -67,4 +65,4 @@ } | ||
shouldEndSession(shouldEndSession) { | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
shouldEndSession | ||
@@ -78,4 +76,4 @@ }) | ||
const { directives: previousDirectives = [] } = this.state.response || {}; | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
directives: [...previousDirectives, ...directives] | ||
@@ -87,9 +85,9 @@ }) | ||
build(attributes) { | ||
return _extends({ | ||
return Object.assign({ | ||
version: '1.0' | ||
}, this.state, { | ||
response: _extends({ | ||
response: Object.assign({ | ||
shouldEndSession: true | ||
}, this.state.response) | ||
}, attributes || this.state.sessionAttributes ? { sessionAttributes: _extends({}, attributes, this.state.sessionAttributes) } : null); | ||
}, attributes || this.state.sessionAttributes ? { sessionAttributes: Object.assign({}, attributes, this.state.sessionAttributes) } : null); | ||
} | ||
@@ -96,0 +94,0 @@ }, _class.ask = (...args) => new Response$1().ask(...args), _class.say = (...args) => new Response$1().say(...args), _class.card = (...args) => new Response$1().card(...args), _class.reprompt = (...args) => new Response$1().reprompt(...args), _class.shouldEndSession = (...args) => new Response$1().shouldEndSession(...args), _class.directives = (...args) => new Response$1().directives(...args), _class.build = params => Object.keys(params).reduce((response, action) => { |
@@ -11,4 +11,2 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _class; | ||
@@ -30,4 +28,4 @@ var _temp; | ||
say(text, type) { | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
shouldEndSession: true | ||
@@ -39,5 +37,5 @@ }, outputSpeech(text, type)) | ||
reprompt(text, type) { | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
reprompt: _extends({}, outputSpeech(text, type)) | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
reprompt: Object.assign({}, outputSpeech(text, type)) | ||
}) | ||
@@ -51,5 +49,5 @@ })); | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
card: _extends({}, rest, type && { type }) | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
card: Object.assign({}, rest, type && { type }) | ||
}) | ||
@@ -60,4 +58,4 @@ })); | ||
attributes(data) { | ||
return new Response(_extends({}, this.state, { | ||
sessionAttributes: _extends({}, this.state.sessionAttributes, data) | ||
return new Response(Object.assign({}, this.state, { | ||
sessionAttributes: Object.assign({}, this.state.sessionAttributes, data) | ||
})); | ||
@@ -67,4 +65,4 @@ } | ||
shouldEndSession(shouldEndSession) { | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
shouldEndSession | ||
@@ -78,4 +76,4 @@ }) | ||
const { directives: previousDirectives = [] } = this.state.response || {}; | ||
return new Response(_extends({}, this.state, { | ||
response: _extends({}, this.state.response, { | ||
return new Response(Object.assign({}, this.state, { | ||
response: Object.assign({}, this.state.response, { | ||
directives: [...previousDirectives, ...directives] | ||
@@ -87,9 +85,9 @@ }) | ||
build(attributes) { | ||
return _extends({ | ||
return Object.assign({ | ||
version: '1.0' | ||
}, this.state, { | ||
response: _extends({ | ||
response: Object.assign({ | ||
shouldEndSession: true | ||
}, this.state.response) | ||
}, attributes || this.state.sessionAttributes ? { sessionAttributes: _extends({}, attributes, this.state.sessionAttributes) } : null); | ||
}, attributes || this.state.sessionAttributes ? { sessionAttributes: Object.assign({}, attributes, this.state.sessionAttributes) } : null); | ||
} | ||
@@ -96,0 +94,0 @@ }, _class.ask = (...args) => new Response$1().ask(...args), _class.say = (...args) => new Response$1().say(...args), _class.card = (...args) => new Response$1().card(...args), _class.reprompt = (...args) => new Response$1().reprompt(...args), _class.shouldEndSession = (...args) => new Response$1().shouldEndSession(...args), _class.directives = (...args) => new Response$1().directives(...args), _class.build = params => Object.keys(params).reduce((response, action) => { |
{ | ||
"name": "alexa-response", | ||
"description": "Build JSON responses for Amazon Alexa, easily.", | ||
"version": "4.2.8", | ||
"repository": "https://github.com/cameronhunter/alexa/tree/master/packages/alexa-response", | ||
"author": "Cameron Hunter <hello@cameronhunter.co.uk>", | ||
"license": "MIT", | ||
"repository": "https://github.com/cameronhunter/alexa/tree/master/packages/alexa-response", | ||
"version": "4.2.9", | ||
"main": "build/index.min.js", | ||
@@ -13,13 +13,13 @@ "files": [ | ||
], | ||
"dependencies": { | ||
"alexa-constants": "^0.4.2", | ||
"ssml-jsx": "^2.0.3" | ||
}, | ||
"keywords": [ | ||
"alexa", | ||
"amazon", | ||
"alexa", | ||
"aws", | ||
"echo", | ||
"aws", | ||
"lambda" | ||
], | ||
"dependencies": { | ||
"alexa-constants": "^0.4.1", | ||
"ssml-jsx": "^2.0.2" | ||
} | ||
] | ||
} |
19777
440
Updatedalexa-constants@^0.4.2
Updatedssml-jsx@^2.0.3