Skip to content

Commit

Permalink
🤖 chore: Patch sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-flying-potato authored and make-github-pseudonymous-again committed Jun 27, 2022
1 parent edd23d6 commit 36b545b
Show file tree
Hide file tree
Showing 20 changed files with 53 additions and 51 deletions.
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from './number/index.js';
export * from './object/index.js';
export * from './isinstance.js';
export * from './isnull.js';
export * from './isundefined.js';
5 changes: 2 additions & 3 deletions src/isinstance.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@


var isinstance = function ( type, obj ) {
export function isinstance ( type, obj ) {

return obj !== null &&
obj !== undefined &&
obj.constructor.prototype === type.prototype;

};
}

exports.isinstance = isinstance;
5 changes: 2 additions & 3 deletions src/isnull.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isnull = function ( obj ) {
export function isnull ( obj ) {

return obj === null;

};
}

exports.isnull = isnull;
5 changes: 2 additions & 3 deletions src/isundefined.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isundefined = function ( obj ) {
export function isundefined ( obj ) {

return obj === undefined;

};
}

exports.isundefined = isundefined;
7 changes: 7 additions & 0 deletions src/number/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export * from './isfinite.js';
export * from './isint.js';
export * from './isint32.js';
export * from './isnan.js';
export * from './isnegativeinfinity.js';
export * from './isnumber.js';
export * from './ispositiveinfinity.js';
5 changes: 2 additions & 3 deletions src/number/isfinite.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@


var isfinite = function ( value ) {
export function isfinite ( value ) {

return isnumber( value ) &&
! ispositiveinfinity( value ) &&
! isnegativeinfinity( value ) &&
! isnan( value );

};
}

exports.isfinite = isfinite;
5 changes: 2 additions & 3 deletions src/number/isint.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isint = function ( value ) {
export function isint ( value ) {

return isfinite( value ) && (value % 1 === 0);

};
}

exports.isint = isint;
5 changes: 2 additions & 3 deletions src/number/isint32.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isint32 = function ( value ) {
export function isint32 ( value ) {

return isfinite( value ) && value === (value | 0);

};
}

exports.isint32 = isint32;
5 changes: 2 additions & 3 deletions src/number/isnan.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@


var isnan = function ( value ) {
export function isnan ( value ) {
return isnumber( value ) && isNaN( value );
};
}

exports.isnan = isnan;
5 changes: 2 additions & 3 deletions src/number/isnegativeinfinity.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@


var isnegativeinfinity = function ( value ) {
export function isnegativeinfinity ( value ) {
return value === -Infinity;
};
}

exports.isnegativeinfinity = isnegativeinfinity;
5 changes: 2 additions & 3 deletions src/number/isnumber.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isnumber = function ( value ) {
export function isnumber ( value ) {

return isinstance( Number, value );

};
}

exports.isnumber = isnumber;
5 changes: 2 additions & 3 deletions src/number/ispositiveinfinity.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@


var ispositiveinfinity = function ( value ) {
export function ispositiveinfinity ( value ) {
return value === Infinity;
};
}

exports.ispositiveinfinity = ispositiveinfinity;
7 changes: 7 additions & 0 deletions src/object/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export * from './isarray.js';
export * from './isboolean.js';
export * from './isdate.js';
export * from './isfunction.js';
export * from './isobject.js';
export * from './isregexp.js';
export * from './isstring.js';
5 changes: 2 additions & 3 deletions src/object/isarray.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isarray = function ( value ) {
export function isarray ( value ) {

return isinstance( Array, value );

};
}

exports.isarray = isarray;
5 changes: 2 additions & 3 deletions src/object/isboolean.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isboolean = function ( value ) {
export function isboolean ( value ) {

return isinstance( Boolean, value );

};
}

exports.isboolean = isboolean;
5 changes: 2 additions & 3 deletions src/object/isdate.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isdate = function ( value ) {
export function isdate ( value ) {

return isinstance( Date, value );

};
}

exports.isdate = isdate;
5 changes: 2 additions & 3 deletions src/object/isfunction.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isfunction = function ( value ) {
export function isfunction ( value ) {

return isinstance( Function, value );

};
}

exports.isfunction = isfunction;
5 changes: 2 additions & 3 deletions src/object/isobject.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isobject = function ( value ) {
export function isobject ( value ) {

return isinstance( Object, value );

};
}

exports.isobject = isobject;
5 changes: 2 additions & 3 deletions src/object/isregexp.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isregexp = function ( value ) {
export function isregexp ( value ) {

return isinstance( RegExp, value );

};
}

exports.isregexp = isregexp;
5 changes: 2 additions & 3 deletions src/object/isstring.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


var isstring = function ( value ) {
export function isstring ( value ) {

return isinstance( String, value );

};
}

exports.isstring = isstring;

0 comments on commit 36b545b

Please sign in to comment.