Coder Social home page Coder Social logo

inspect-js / has-symbols Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 4.0 87 KB

Determine if the JS environment has Symbol support. Supports spec, or shams.

License: MIT License

JavaScript 100.00%
symbol symbol-support javascript ecmascript has symbols es6 es2015 core-js

has-symbols's People

Contributors

ljharb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

has-symbols's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • [Deps] Update Update eslint to v8.57.0
  • [Deps] Update Update core-js to v3
  • [Deps] Update Update eslint to v9
  • [Deps] Update Update nyc to v15
  • [Deps] Update Update actions/checkout action to v4
  • [Deps] Update Update codecov/codecov-action action to v4
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Detected dependencies

github-actions
.github/workflows/node-10-11.yml
  • actions/checkout v2
  • codecov/codecov-action v2
  • actions/checkout v2
  • codecov/codecov-action v2
.github/workflows/node-12-13.yml
  • actions/checkout v2
  • codecov/codecov-action v2
  • actions/checkout v2
  • codecov/codecov-action v2
.github/workflows/node-14-15.yml
  • actions/checkout v2
  • codecov/codecov-action v2
  • actions/checkout v2
  • codecov/codecov-action v2
.github/workflows/node-16+.yml
  • actions/checkout v2
  • codecov/codecov-action v2
  • actions/checkout v2
  • codecov/codecov-action v2
.github/workflows/node-4-6.yml
  • actions/checkout v2
  • codecov/codecov-action v2
  • actions/checkout v2
  • codecov/codecov-action v2
.github/workflows/node-7-9.yml
  • actions/checkout v2
  • codecov/codecov-action v2
  • actions/checkout v2
  • codecov/codecov-action v2
.github/workflows/node-iojs.yml
  • actions/checkout v2
  • codecov/codecov-action v2
  • actions/checkout v2
  • codecov/codecov-action v2
.github/workflows/node-pretest.yml
.github/workflows/node-zero.yml
  • actions/checkout v2
  • codecov/codecov-action v2
  • actions/checkout v2
  • codecov/codecov-action v2
.github/workflows/rebase.yml
.github/workflows/require-allow-edits.yml
npm
package.json
  • @ljharb/eslint-config ^21.0.0
  • aud ^2.0.1
  • auto-changelog ^2.4.0
  • core-js ^2.6.12
  • eslint =8.8.0
  • get-own-property-symbols ^0.9.5
  • in-publish ^2.0.1
  • npmignore ^0.3.0
  • nyc ^10.3.2
  • safe-publish-latest ^2.0.0
  • tape ^5.6.1
  • node >= 0.4

  • Check this box to trigger a request for Renovate to run again on this repository

safely use global

in the source code

var origSymbol = global.Symbol;

i think this one better

var origSymbol = global && global.Symbol;

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

Reduce the size of the npm package by limiting the included files

Looks like the files property (https://docs.npmjs.com/files/package.json#files) is not used in package.json to specify the included files, nor is the .npmignore file (https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package) is being used for blacklisting unwanted files, for the package published to npm.

Would you consider adding either the files property or the .npmignore file, so that the resulting package file would have smaller size?

The current size can be seen when executing the command npm pack (https://docs.npmjs.com/cli/pack).

This issue was create via tawata

An in-range update of tape is breaking the build ๐Ÿšจ


๐Ÿšจ Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! ๐Ÿ’œ ๐Ÿšš๐Ÿ’จ ๐Ÿ’š

Find out how to migrate to Snyk at greenkeeper.io


The devDependency tape was updated from 5.0.0 to 5.0.1.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

Commits

The new version differs by 16 commits.

  • ce9a282 v5.0.1
  • b7af113 Merge tag 'v4.13.3'
  • a861230 v4.13.3
  • 9676a21 [Dev Deps] update eslint, falafel, js-yaml
  • 8887189 [Deps] update minimist, resolve
  • fb94836 [Fix] createStream: result payload is not always an object
  • 582fe00 [Fix] createStream: result payload is not always an object (#519)
  • c421eb3 [Dev Deps] update eslint
  • 751e592 [Fix] Update RegExp for matching stack frames to handle Promise/then scenario (#516)
  • 470e43b [Fix] Update RegExp for matching stack frames to handle Promise/then scenario
  • 33712e2 [readme] add tape-repeater (#511)
  • 0b5804d [readme] add tape-repeater
  • 9b87675 [examples] add ecstatic
  • bc1334b [readme] Add link to tape-player (in-process reporter) (#496)
  • 6326dc6 [Docs] add an optional emoji version for tap-spec consumer (#501)

There are 16 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

wrong syntax in tests

/test/shams/core-js.js line 11

return; should not be there

/test/shams/get-own-property-symbols.js line 11

return; should not be there

those syntax errors causing IDEs to highlight your package as faulty

An in-range update of auto-changelog is breaking the build ๐Ÿšจ


โ˜๏ธ Important announcement: Greenkeeper will be saying goodbye ๐Ÿ‘‹ and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The devDependency auto-changelog was updated from 1.16.2 to 1.16.3.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

auto-changelog is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

Commits

The new version differs by 4 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

Building with babel is crashing because of 'return' outside of function.

I'm using babel to build my code but it's crashing with an error -

 SyntaxError: node_modules/has-symbols/test/shams/core-js.js: 'return' outside of function (11:1)

   9 | 		t.end();
  10 | 	});
> 11 | 	return;
   | 	^
  12 | }
  13 | 
  14 | var hasSymbols = require('../../shams');

Any way I can resolve this?

Action required: Greenkeeper could not be activated ๐Ÿšจ

๐Ÿšจ You need to enable Continuous Integration on Greenkeeper branches of this repository. ๐Ÿšจ

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didnโ€™t receive a CI status on the greenkeeper/initial branch, itโ€™s possible that you donโ€™t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how itโ€™s configured. Make sure it is set to run on all new branches. If you donโ€™t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, youโ€™ll need to re-trigger Greenkeeperโ€™s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

global is not defined

Hello,

I use vuepress (Vuejs) that use library using has-symbols, an error occured:
global is not defined in the library script

'use strict';

// V Error is throw next line V
var origSymbol = global.Symbol;
var hasSymbolSham = require('./shams');

module.exports = function hasNativeSymbols() {
	if (typeof origSymbol !== 'function') { return false; }
	if (typeof Symbol !== 'function') { return false; }
	if (typeof origSymbol('foo') !== 'symbol') { return false; }
	if (typeof Symbol('bar') !== 'symbol') { return false; }

	return hasSymbolSham();
};

So to correct it, I add in my scripts

window.global = window

I see that this error is throwed with angular also, so it looks that more and more framework doesn't support global ๐Ÿ˜‰

Can you add a check on window.global to avoid create an error when it isn't define ?
Just emit a default value when not defined ?

Thank you ๐Ÿ˜ƒ ๐Ÿ˜„

Have a nice day and be happy !
Kรฉvin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.