normalize-for-search
Advanced tools
Comparing version 1.2.0 to 2.0.0
{ | ||
"name": "normalize-for-search", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"description": "Un-accents and un-umlauts characters in a string. Also preliminary converts the string to lower case. We use it for autocomplete: both for the matched strings -- on the server side, when indexing; and for the strings the user types into a text input in the browser.", | ||
@@ -27,5 +27,5 @@ "main": "src/normalize.js", | ||
"devDependencies": { | ||
"jshint": "~2.1.2", | ||
"mocha": "~1.9.0" | ||
"jshint": "~2.9.2", | ||
"mocha": "~2.5.3" | ||
} | ||
} |
@@ -14,3 +14,3 @@ [![Build Status](https://travis-ci.org/ikr/normalize-for-search.svg?branch=master)](https://travis-ci.org/ikr/normalize-for-search) | ||
## Under Node.js | ||
## NPM (Node.js, Browserify, Webpack) | ||
@@ -23,3 +23,3 @@ $ npm install --save normalize-for-search | ||
## In CouchDB | ||
## CouchDB | ||
@@ -32,20 +32,6 @@ Just drop the `src/normalize.js` contents into your CouchDB design document -- for example, into | ||
## In the browser, with AngularJS | ||
## Direct <script> in the browser | ||
$ bower install --save normalize-for-search | ||
Including `src/normalize.js` into a Web page will create a global `normalizeForSearch` function. | ||
then | ||
<script src="/components/normalize-for-search/src/normalize.js"></script> | ||
<script> | ||
var injector = angular.injector(['normalizeForSearch']); | ||
injector.invoke(function (normalizeForSearchFilter) { ... }); | ||
</script> | ||
<p>{{ text | normalizeForSearch }}</p> | ||
Thus, the Angular module `normalizeForSearch` declares a filter function available both in the | ||
HTML partials, and in the controllers' code. | ||
# API | ||
@@ -52,0 +38,0 @@ |
@@ -80,7 +80,5 @@ /* jshint maxcomplexity: 100 */ | ||
} | ||
else if (typeof angular !== 'undefined' && angular.module) { | ||
angular.module('normalizeForSearch', []).filter('normalizeForSearch', function () { | ||
return normalizeForSearch; | ||
}); | ||
else { | ||
window.normalizeForSearch = normalizeForSearch; | ||
} | ||
}(this)); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9
14815
125
60