New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

input-with-hints

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

input-with-hints - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

33

package.json
{
"name": "input-with-hints",
"version": "1.0.0",
"description": "input with hints",
"version": "2.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "babel --watch ./src/input-with-hints.js --out-file ./index.js"
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Thisman",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.9.0",
"babel-preset-es2015": "^6.9.0"
},
"dependencies": {
"classnames": "^2.2.5",
"react": "^15.1.0",
"react-dom": "^15.1.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Thisman/input-with-hints.git"
"url": "git+https://github.com/npm/deprecate-holder.git"
},
"keywords": [
"react",
"react-input",
"input",
"hints",
"react-component",
"drop-down"
],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/Thisman/input-with-hints/issues"
"url": "https://github.com/npm/deprecate-holder/issues"
},
"homepage": "https://github.com/Thisman/input-with-hints#readme"
"homepage": "https://github.com/npm/deprecate-holder#readme"
}

@@ -1,68 +0,5 @@

# input-with-hints
input with drop-down hints (supports hot key)
# Deprecated Package
# Usage
```
npm install --save input-with-hints
```
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name.
```js
import React from "react";
import {render} from "react-dom";
import InputWithHints from "input-with-hints";
import "input-with-hints/style.css";
const mockHints = [
{id: "0", value: "Пермь"},
{id: "1", value: "Москва"},
{id: "2", value: "Питер"},
{id: "3", value: "Киев"},
{id: "4", value: "Казань"},
{id: "5", value: "Минск"},
{id: "6", value: "Мурманск"},
{id: "7", value: "Владивосток"},
{id: "8", value: "Екатеринбург"},
{id: "9", value: "Севастополь"},
{id: "10", value: "Севастополь и очень длинное название другого города"},
]
class App extends React.Component {
constructor() {
super();
this.state = {value: ''}
this.handleChange = this.handleChange.bind(this);
}
render() {
let hints = [];
let valueToLowCase = this.state.value.toLowerCase();
if(this.state.value) {
hints = mockHints.filter( hint =>
hint.value
.toLowerCase()
.includes(valueToLowCase)
)
}
return(
<div className='app'>
<InputWithHints
onChange={this.handleChange}
value={this.state.value}
hints={hints}
/>
</div>
)
}
handleChange(value, target) {
this.setState({value});
}
}
render(
<App />,
document.getElementById("app")
)
```
# Supports
Test only in Google Chrome *v50.0.2661.102 m*
Please contact support@npmjs.com if you have questions about this package.
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