mirror of
https://github.com/samsonjs/batteries.git
synced 2026-03-25 09:15:46 +00:00
minor fixes
This commit is contained in:
parent
a74ea00f16
commit
ef74c72bc8
3 changed files with 12 additions and 5 deletions
|
|
@ -62,7 +62,7 @@ var ArrayExt = exports.ArrayExt = {
|
|||
// pack
|
||||
// partition
|
||||
|
||||
, pluck: function(a, /* key paths, ... */) {
|
||||
, pluck: function(a /* , key paths, ... */) {
|
||||
var args = [].slice.call(arguments, 1);
|
||||
args.unshift(a);
|
||||
return pluck.apply(null, args);
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ var DateExt = {
|
|||
},
|
||||
shortMonth: function(d) {
|
||||
return MonthsShort(d.getMonth());
|
||||
}
|
||||
},
|
||||
weekday: function(d) {
|
||||
return Weekdays(d.getDay());
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
var constants = require('constants')
|
||||
, fs = require('fs')
|
||||
var fs = require('fs')
|
||||
, ArrayExt = require('./array-ext').ArrayExt
|
||||
, LineEmitter = require('./line-emitter').LineEmitter
|
||||
, ext = require('./ext')
|
||||
, ENOENT = constants.ENOENT
|
||||
, constants
|
||||
, ENOENT
|
||||
;
|
||||
|
||||
try {
|
||||
constants = require('constants')
|
||||
} catch (e) {
|
||||
constants = process
|
||||
}
|
||||
ENOENT = constants.ENOENT
|
||||
|
||||
exports.extend = function(obj) {
|
||||
ext.extend(obj || fs, FileExt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue