Skip to content

Commit 8d63ae2

Browse files
committed
added example for node.js package and bumped npm version number
1 parent 8ea09b9 commit 8d63ae2

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

node/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ As well as creating general confusion, homoglyphs can cause particular problems
3737
* 1.0.0 Initial release
3838
* 1.0.1 Added README
3939
* 1.0.2 Totally failed to follow basic instructions on how to add engines config to package.json - don't use this version
40-
* 1.0.3 Added engines config to package.json
40+
* 1.0.3 Added engines config to package.json
41+
* 1.0.4 Added example code with Tonic integration

node/example/example.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var homoglyphSearch = require('homoglyph-search');
2+
3+
var textToSearch = 'Get free ϲrEd1ᴛ';
4+
var bannedWords = ['credit'];
5+
6+
var result = homoglyphSearch.search(textToSearch, bannedWords);
7+
8+
console.log(result);

node/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "homoglyph-search",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "A homoglyph-aware text search utility, allows you to search a string for a given word even if that word has been disguised using homoglyph characters",
55
"main": "index.js",
66
"engines" : {
@@ -23,6 +23,7 @@
2323
],
2424
"author": "Rob Dawson <[email protected]> (http://codebox.org.uk)",
2525
"license": "MIT",
26+
"tonicExampleFilename" : "example/example.js",
2627
"bugs": {
2728
"url": "https://github.com/codebox/homoglyph/issues"
2829
},

0 commit comments

Comments
 (0)