59 lines
1.4 KiB
JavaScript
59 lines
1.4 KiB
JavaScript
/**
|
|
* @license Apache-2.0
|
|
*
|
|
* Copyright (c) 2018 The Stdlib Authors.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
// MODULES //
|
|
|
|
var keys = require( './builtin.js' );
|
|
|
|
|
|
// FUNCTIONS //
|
|
|
|
/**
|
|
* Tests the built-in `Object.keys()` implementation when provided `arguments`.
|
|
*
|
|
* @private
|
|
* @returns {boolean} boolean indicating whether the built-in implementation returns the expected number of keys
|
|
*/
|
|
function test() {
|
|
return ( keys( arguments ) || '' ).length !== 2;
|
|
}
|
|
|
|
|
|
// MAIN //
|
|
|
|
/**
|
|
* Tests whether the built-in `Object.keys()` implementation supports providing `arguments` as an input value.
|
|
*
|
|
* ## Notes
|
|
*
|
|
* - Safari 5.0 does **not** support `arguments` as an input value.
|
|
*
|
|
* @private
|
|
* @returns {boolean} boolean indicating whether a built-in implementation supports `arguments`
|
|
*/
|
|
function check() {
|
|
return test( 1, 2 );
|
|
}
|
|
|
|
|
|
// EXPORTS //
|
|
|
|
module.exports = check;
|