Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

matches-selector-ng

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

matches-selector-ng - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

.editorconfig

8

CHANGELOG.md
This project follows the [Semantic Versioning](https://semver.org/) convention,
so breaking changes will only be made in major version updates.
## 1.1.0 (2018-09-25)
* Added TypeScript type definitions.
## 1.0.1 (2018-06-04)

@@ -10,2 +14,4 @@

* First stable release.
Initial forked release.
* Added Flow type definitions.

10

js/index.js

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -14,2 +14,3 @@ exports.__esModule = true;

var nodes = parentNode.querySelectorAll(selector);
for (var i = 0; i < nodes.length; i++) {

@@ -19,5 +20,8 @@ if (nodes[i] === el) return true;

}
return false;
}
module.exports = exports['default'];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJtYXRjaCIsInByb3RvIiwiZ2xvYmFsIiwiRWxlbWVudCIsInByb3RvdHlwZSIsInZlbmRvciIsIm1hdGNoZXMiLCJtYXRjaGVzU2VsZWN0b3IiLCJ3ZWJraXRNYXRjaGVzU2VsZWN0b3IiLCJtb3pNYXRjaGVzU2VsZWN0b3IiLCJtc01hdGNoZXNTZWxlY3RvciIsIm9NYXRjaGVzU2VsZWN0b3IiLCJlbCIsInNlbGVjdG9yIiwiY2FsbCIsInBhcmVudE5vZGUiLCJxdWVyeVNlbGVjdG9yQWxsIiwibm9kZXMiLCJpIiwibGVuZ3RoIl0sIm1hcHBpbmdzIjoiOzs7a0JBVXdCQSxLO0FBUnhCLElBQU1DLFFBQVFDLE9BQU9DLE9BQVAsSUFBa0JELE9BQU9DLE9BQVAsQ0FBZUMsU0FBL0M7QUFDQSxJQUFNQ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G9yXG4gIHx8IHByb3RvLm1zTWF0Y2hlc1NlbGVjdG9yXG4gIHx8IHByb3RvLm9NYXRjaGVzU2VsZWN0b3IpO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBtYXRjaChlbDogSFRNTEVsZW1lbnQsIHNlbGVjdG9yOiBzdHJpbmcpOiBib29sZWFuIHtcbiAgaWYgKHZlbmRvcikgcmV0dXJuIHZlbmRvci5jYWxsKGVsLCBzZWxlY3Rvcik7XG4gIGNvbnN0IHtwYXJlbnROb2RlfSA9IGVsO1xuICBpZiAocGFyZW50Tm9kZSAmJiB0eXBlb2YgKHBhcmVudE5vZGU6YW55KS5xdWVyeVNlbGVjdG9yQWxsID09PSAnZnVuY3Rpb24nKSB7XG4gICAgY29uc3Qgbm9kZXMgPSAocGFyZW50Tm9kZTphbnkpLnF1ZXJ5U2VsZWN0b3JBbGwoc2VsZWN0b3IpO1xuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbm9kZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGlmIChub2Rlc1tpXSA9PT0gZWwpIHJldHVybiB0cnVlO1xuICAgIH1cbiAgfVxuICByZXR1cm4gZmFsc2U7XG59XG4iXX0=
module.exports = exports.default;
module.exports.default = exports.default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJwcm90byIsImdsb2JhbCIsIkVsZW1lbnQiLCJwcm90b3R5cGUiLCJ2ZW5kb3IiLCJtYXRjaGVzIiwibWF0Y2hlc1NlbGVjdG9yIiwid2Via2l0TWF0Y2hlc1NlbGVjdG9yIiwibW96TWF0Y2hlc1NlbGVjdG9yIiwibXNNYXRjaGVzU2VsZWN0b3IiLCJvTWF0Y2hlc1NlbGVjdG9yIiwibWF0Y2giLCJlbCIsInNlbGVjdG9yIiwiY2FsbCIsInBhcmVudE5vZGUiLCJxdWVyeVNlbGVj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VzQ29udGVudCI6WyIvKiBAZmxvdyAqL1xuXG5jb25zdCBwcm90byA9IGdsb2JhbC5FbGVtZW50ICYmIGdsb2JhbC5FbGVtZW50LnByb3RvdHlwZTtcbmNvbnN0IHZlbmRvciA9IHByb3RvICYmIChwcm90by5tYXRjaGVzXG4gIHx8IHByb3RvLm1hdGNoZXNTZWxlY3RvclxuICB8fCBwcm90by53ZWJraXRNYXRjaGVzU2VsZWN0b3JcbiAgfHwgcHJvdG8ubW96TWF0Y2hlc1NlbGVjdG9yXG4gIHx8IHByb3RvLm1zTWF0Y2hlc1NlbGVjdG9yXG4gIHx8IHByb3RvLm9NYXRjaGVzU2VsZWN0b3IpO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBtYXRjaChlbDogSFRNTEVsZW1lbnQsIHNlbGVjdG9yOiBzdHJpbmcpOiBib29sZWFuIHtcbiAgaWYgKHZlbmRvcikgcmV0dXJuIHZlbmRvci5jYWxsKGVsLCBzZWxlY3Rvcik7XG4gIGNvbnN0IHtwYXJlbnROb2RlfSA9IGVsO1xuICBpZiAocGFyZW50Tm9kZSAmJiB0eXBlb2YgKHBhcmVudE5vZGU6YW55KS5xdWVyeVNlbGVjdG9yQWxsID09PSAnZnVuY3Rpb24nKSB7XG4gICAgY29uc3Qgbm9kZXMgPSAocGFyZW50Tm9kZTphbnkpLnF1ZXJ5U2VsZWN0b3JBbGwoc2VsZWN0b3IpO1xuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbm9kZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGlmIChub2Rlc1tpXSA9PT0gZWwpIHJldHVybiB0cnVlO1xuICAgIH1cbiAgfVxuICByZXR1cm4gZmFsc2U7XG59XG4iXX0=
Copyright (c) 2013 Forbes Lindesay
Copyright (c) 2016 Chris Cowan <agentme49@gmail.com>
Copyright (c) 2018 Chris Cowan <agentme49@gmail.com>

@@ -4,0 +4,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "matches-selector-ng",
"version": "1.0.1",
"version": "1.1.0",
"description": "Check if a DOM element matches a given selector, with decent browser support and unit tests.",
"main": "js/index.js",
"sideEffects": false,
"scripts": {
"prepare": "babel -s inline -d js/ src/ --ignore '*.test.*' && flow-copy-source -v src js --ignore '*.test.*'",
"test": "npm run lint && npm run flow_check && jest",
"flow_check": "flow check",
"prepare": "rimraf js/ && babel -s inline -d js/ src/ --ignore '**/*.test.js' && flow-copy-source -v src js --ignore '*.test.*'",
"test": "yarn run lint && flow check && jest && tsc",
"lint": "eslint .",

@@ -19,24 +19,33 @@ "lint-fix": "eslint . --fix"

"bugs": {
"url": "https://github.com/AgentME/matches-selector-ng/issues"
"url": "https://github.com/Macil/matches-selector-ng/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/AgentME/matches-selector-ng.git"
"url": "git+https://github.com/Macil/matches-selector-ng.git"
},
"homepage": "https://github.com/AgentME/matches-selector-ng#readme",
"homepage": "https://github.com/Macil/matches-selector-ng#readme",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-eslint": "^8.2.3",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"@babel/register": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.0",
"babel-jest": "^23.0.1",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-flow-strip-types": "^6.18.0",
"babel-preset-es2015": "^6.18.0",
"babel-register": "^6.18.0",
"eslint": "^4.19.1",
"babel-plugin-add-module-exports": "^1.0.0",
"eslint": "^5.6.0",
"eslint-plugin-flowtype": "^2.25.0",
"flow-bin": "^0.73.0",
"flow-bin": "^0.81.0",
"flow-copy-source": "^2.0.0",
"jest": "^23.1.0"
"jest": "^23.1.0",
"rimraf": "^2.6.2",
"typescript": "^3.0.3"
},
"greenkeeper": {
"ignore": [
"flow-bin"
]
}
}
# matches-selector-ng
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/AgentME/matches-selector-ng/blob/master/LICENSE.txt) [![npm version](https://img.shields.io/npm/v/matches-selector-ng.svg?style=flat)](https://www.npmjs.com/package/matches-selector-ng) [![CircleCI Status](https://circleci.com/gh/AgentME/matches-selector-ng.svg?style=shield)](https://circleci.com/gh/AgentME/matches-selector-ng) [![Greenkeeper badge](https://badges.greenkeeper.io/AgentME/matches-selector-ng.svg)](https://greenkeeper.io/)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Macil/matches-selector-ng/blob/master/LICENSE.txt) [![npm version](https://img.shields.io/npm/v/matches-selector-ng.svg?style=flat)](https://www.npmjs.com/package/matches-selector-ng) [![CircleCI Status](https://circleci.com/gh/Macil/matches-selector-ng.svg?style=shield)](https://circleci.com/gh/Macil/matches-selector-ng) [![Greenkeeper badge](https://badges.greenkeeper.io/Macil/matches-selector-ng.svg)](https://greenkeeper.io/)

@@ -23,3 +23,4 @@ Check if an element matches a given selector. Uses the native

[Flow](https://flowtype.org/) type declarations for this module are included!
If you are using Flow, they won't require any configuration to use.
Both [TypeScript](https://www.typescriptlang.org/) and
[Flow](https://flowtype.org/) type definitions for this module are included!
The type definitions won't require any configuration to use.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc