Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niksy/hascheck
Interface to Hrvatski akademski spelling checker.
https://github.com/niksy/hascheck
Last synced: about 2 months ago
JSON representation
Interface to Hrvatski akademski spelling checker.
- Host: GitHub
- URL: https://github.com/niksy/hascheck
- Owner: niksy
- License: mit
- Created: 2014-06-15T18:37:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-02T10:35:16.000Z (about 10 years ago)
- Last Synced: 2024-10-26T11:26:55.425Z (2 months ago)
- Language: JavaScript
- Size: 383 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# hascheck
Interface to [Hrvatski akademski spelling checker](http://hacheck.tel.fer.hr/).
## Installation
```sh
# NPM
npm install hascheck# Bower
bower install niksy/hascheck
```## API
### `hascheck(text, cb)`
Checks for errors and suggestions.
#### `text`
Type: `String`
String to check.
#### `cb`
Type: `Function`
Arguments: [List of errors and suggestions]Callback to execute after text has been checked.
## Examples
### Initalization
```js
// Node
var hascheck = require('hascheck');// Require.js
define(['hascheck'], function ( hascheck ) {
// Code away
});// Global browser module
window.hascheck;
```### Usage
```js
hascheck('podjelio ljepo čovijek sumljam počmem s tobom sa tobom kuča', function ( results ) {
// [{suspicious:"počmem",suggestions:["počnem"]},{suspicious:"sumljam",suggestions:["smuljam","sukljam","sumnjam","mumljam"]},…]
});
```## Browser support
Tested in IE8+ and all modern browsers.
## License
MIT © [Ivan Nikolić](http://ivannikolic.com)