diff --git a/README.md b/README.md index caad403..44eab54 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,6 @@ NB [core-util-is](https://www.npmjs.com/package/core-util-is)'s `isBuffer` is no #### Other -* `isArguments` - `true` if is an arguments object * `isType( type, input )` - `true` if `typeof input === type` ## Versioning diff --git a/src/index.js b/src/index.js index 06bb49d..1f17b2e 100644 --- a/src/index.js +++ b/src/index.js @@ -120,10 +120,6 @@ export function isType(type, arg) { return getType(arg) === type; } -export function isArguments(arg) { - return isTypeByToString('Arguments', arg); -} - /* * Helpers */ diff --git a/test/other.test.js b/test/other.test.js deleted file mode 100644 index 47c752b..0000000 --- a/test/other.test.js +++ /dev/null @@ -1,41 +0,0 @@ -/* -------------------- - * is-it-type module - * Tests for number methods - * ------------------*/ - -// Modules -import {isArguments} from 'is-it-type'; - -// Tests - -describe('isArguments', () => { - it('returns true for arguments object', () => { - const args = (function() { return arguments; }(1, 2, 3)); // eslint-disable-line prefer-rest-params - expect(isArguments(args)).toBe(true); - }); - - it('returns true for empty arguments object', () => { - const args = (function() { return arguments; }()); // eslint-disable-line prefer-rest-params - expect(isArguments(args)).toBe(true); - }); - - it('returns false for string', () => { - expect(isArguments('2')).toBe(false); - }); - - it('returns false for null', () => { - expect(isArguments(null)).toBe(false); - }); - - it('returns false for boolean', () => { - expect(isArguments(true)).toBe(false); - }); - - it('returns false for object', () => { - expect(isArguments({})).toBe(false); - }); - - it('returns false for function', () => { - expect(isArguments(function() {})).toBe(false); // eslint-disable-line prefer-arrow-callback - }); -});