mirror of
https://github.com/samsonjs/batteries.git
synced 2026-04-27 15:07:42 +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
|
// pack
|
||||||
// partition
|
// partition
|
||||||
|
|
||||||
, pluck: function(a, /* key paths, ... */) {
|
, pluck: function(a /* , key paths, ... */) {
|
||||||
var args = [].slice.call(arguments, 1);
|
var args = [].slice.call(arguments, 1);
|
||||||
args.unshift(a);
|
args.unshift(a);
|
||||||
return pluck.apply(null, args);
|
return pluck.apply(null, args);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ var DateExt = {
|
||||||
},
|
},
|
||||||
shortMonth: function(d) {
|
shortMonth: function(d) {
|
||||||
return MonthsShort(d.getMonth());
|
return MonthsShort(d.getMonth());
|
||||||
}
|
},
|
||||||
weekday: function(d) {
|
weekday: function(d) {
|
||||||
return Weekdays(d.getDay());
|
return Weekdays(d.getDay());
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
var constants = require('constants')
|
var fs = require('fs')
|
||||||
, fs = require('fs')
|
|
||||||
, ArrayExt = require('./array-ext').ArrayExt
|
, ArrayExt = require('./array-ext').ArrayExt
|
||||||
, LineEmitter = require('./line-emitter').LineEmitter
|
, LineEmitter = require('./line-emitter').LineEmitter
|
||||||
, ext = require('./ext')
|
, ext = require('./ext')
|
||||||
, ENOENT = constants.ENOENT
|
, constants
|
||||||
|
, ENOENT
|
||||||
;
|
;
|
||||||
|
|
||||||
|
try {
|
||||||
|
constants = require('constants')
|
||||||
|
} catch (e) {
|
||||||
|
constants = process
|
||||||
|
}
|
||||||
|
ENOENT = constants.ENOENT
|
||||||
|
|
||||||
exports.extend = function(obj) {
|
exports.extend = function(obj) {
|
||||||
ext.extend(obj || fs, FileExt);
|
ext.extend(obj || fs, FileExt);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue