How to use the object-keys.shim function in object-keys

To help you get started, we’ve selected a few object-keys examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stdlib-js / stdlib / lib / node_modules / @stdlib / plot / plot / lib / validate.js View on Github external
'use strict';

// MODULES //

var getKeys = require( 'object-keys' ).shim();
var isObject = require( '@stdlib/utils/is-object' ); // TODO: plain object
var validators = require( './validators' );


// VARIABLES //

var KEYS = getKeys( validators );


// VALIDATE //

/**
* Validates function options.
*
* @private
* @param {Options} options - function options
github stdlib-js / stdlib / lib / node_modules / @stdlib / utils / error-reviver / lib / reviver.js View on Github external
'use strict';

// MODULES //

var getKeys = require( 'object-keys' ).shim();
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
var ctors = require( './ctors.js' );


// MAIN //

/**
* Revives a JSON-serialized error object.
*
* @param {string} key - key
* @param {*} value - value
* @returns {(*|Error|SyntaxError|URIError|EvalError|ReferenceError|RangeError|TypeError)} value or error object
*
* @example
* var str = '{"type":"TypeError","message":"beep"}';
* var err = JSON.parse( str, reviver );
github stdlib-js / stdlib / lib / node_modules / @stdlib / math / base / dists / invgamma / examples / index.js View on Github external
* 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';

var getKeys = require( 'object-keys' ).shim();
var invgamma = require( './../lib' );

console.log( getKeys( invgamma ) );
github stdlib-js / stdlib / lib / node_modules / @stdlib / math / base / dists / lognormal / examples / index.js View on Github external
* 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';

var getKeys = require( 'object-keys' ).shim();
var lognormal = require( './../lib' );

console.log( getKeys( lognormal ) );
github stdlib-js / stdlib / lib / node_modules / @stdlib / math / base / dists / hypergeometric / examples / index.js View on Github external
* 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';

var getKeys = require( 'object-keys' ).shim();
var hypergeometric = require( './../lib' );

console.log( getKeys( hypergeometric ) );
github stdlib-js / stdlib / lib / node_modules / @stdlib / math / base / dists / t / examples / index.js View on Github external
* 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';

var getKeys = require( 'object-keys' ).shim();
var t = require( './../lib' );

console.log( getKeys( t ) );
github stdlib-js / stdlib / lib / node_modules / @stdlib / math / base / dists / binomial / examples / index.js View on Github external
* 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';

var getKeys = require( 'object-keys' ).shim();
var binomial = require( './../lib' );

console.log( getKeys( binomial ) );
github stdlib-js / stdlib / lib / node_modules / @stdlib / math / base / dists / cosine / examples / index.js View on Github external
* 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';

var getKeys = require( 'object-keys' ).shim();
var cosine = require( './../lib' );

console.log( getKeys( cosine ) );
github stdlib-js / stdlib / lib / node_modules / @stdlib / math / base / dists / gumbel / examples / index.js View on Github external
* 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';

var getKeys = require( 'object-keys' ).shim();
var gumbel = require( './../lib' );

console.log( getKeys( gumbel ) );
github stdlib-js / stdlib / workshops / numeric-computing / exercises / native-math / solutions / 4.js View on Github external
'use strict';

var toHTML = require( 'vdom-to-html' );
var getKeys = require( 'object-keys' ).shim();
var Plot = require( '@stdlib/plot/ctor' );
var epsdiff = require( '@stdlib/math/base/utils/float64-epsilon-difference' );
var httpServer = require( '@stdlib/tools/disposable-http-server' );
var Float64Array = require( '@stdlib/array/float64' );
var rmse = require( './2.js' );

/**
* Compute the deviations between a native JavaScript Math method and a standard and returns a rendered plot.
*
* @private
* @param {string} method - Math method
* @param {...NumericArray} args - method arguments
* @param {NumericArray} expected - expected results
* @returns {string} rendered plot
*/
function deviations( method ) {

object-keys

An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim

MIT
Latest version published 5 years ago

Package Health Score

67 / 100
Full package analysis

Popular object-keys functions