forked from sailshq/skipper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstringfile.js
More file actions
37 lines (26 loc) · 753 Bytes
/
stringfile.js
File metadata and controls
37 lines (26 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Module dependencies
*/
var deep = require('dot-access')
, util = require('util');
var STRINGFILE = {
warning: {
paramArrivedTooLate:
'Unable to expose body parameter `%s` in streaming upload!\n'+
'Client tried to send a text parameter (%s) ' +
'after one or more files had already been sent.\n'+
'Make sure you always send text params first, then your files.\n'+
'(In an HTML form, it\'s as easy as making sure your text inputs are listed before your file inputs.'
},
parser: {
form: {
onClose: 'Form: emitted `close`'
}
}
};
module.exports = {
get: function (keypath, args) {
args = (args && args.length) ? args : [];
return util.format.apply(util, [deep.get(STRINGFILE, keypath)].concat(args));
}
};