UNPKG

@stdlib/esm

Version:

ES module distribution for Stdlib, a standard library for JavaScript and Node.js.

3 lines 1.99 kB
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import r from"./../assert/is-arguments.js";import t from"./../assert/is-object-like.js";import e from"./../assert/has-own-property.js";import o from"./../assert/is-enumerable-property.js";import n from"./noop.js";import i from"./index-of.js";import f from"./type-of.js";function s(r){return Object.keys(Object(r))}var u=s;function p(){return 2!==(u(arguments)||"").length}function c(){return p(1,2)}var a=void 0!==Object.keys,l=r,m=s,g=Array.prototype.slice;function y(r){return l(r)?m(g.call(r)):m(r)}var d=o,h=n,j=d(h,"prototype"),v=o,w={toString:null},b=!v(w,"toString");function S(r){return r.constructor&&r.constructor.prototype===r}var O,k=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],x="undefined"==typeof window?void 0:window,I=e,E=i,H=f,L=S,P=k,W=x;function X(){var r;if("undefined"===H(W))return!1;for(r in W)try{-1===E(P,r)&&I(W,r)&&null!==W[r]&&"object"===H(W[r])&&L(W[r])}catch(r){return!0}return!1}var Y=O=X(),A="undefined"!=typeof window,B=Y,D=S,T=A;function q(r){if(!1===T&&!B)return D(r);try{return D(r)}catch(r){return!1}}var z=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],C=t,F=e,G=r,J=j,K=b,M=q,N=z;function Q(r){var t,e,o,n,i,f,s;if(n=[],G(r)){for(s=0;s<r.length;s++)n.push(s.toString());return n}if("string"==typeof r){if(r.length>0&&!F(r,"0"))for(s=0;s<r.length;s++)n.push(s.toString())}else{if(!1===(o="function"==typeof r)&&!C(r))return n;e=J&&o}for(i in r)e&&"prototype"===i||!F(r,i)||n.push(String(i));if(K)for(t=M(r),s=0;s<N.length;s++)f=N[s],t&&"constructor"===f||!F(r,f)||n.push(String(f));return n}var R,U=c,V=a,Z=s,$=y,_=Q,rr=R=V?U()?$:Z:_,tr=rr;export default tr; //# sourceMappingURL=keys.js.map