indefinite
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -159,3 +159,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
// Nouns: u like y | ||
'ubiquity', 'udometer', 'ufo', 'uke', 'ukelele', 'ululate', 'unicorn', 'unicycle', 'uniform', 'unify', 'union', 'unison', 'unit', 'unity', 'universe', 'university', 'upas', 'ural', 'uranium', 'urea', 'ureter', 'urethra', 'urine', 'urology', 'urus', 'usage', 'use', 'usual', 'usurp', 'usury', 'utensil', 'uterus', 'utility', 'utopia', 'utricle', 'uvarovite', 'uvea', 'uvula', | ||
'ubiquity', 'udometer', 'ufo', 'uke', 'ukelele', 'ululate', 'unicorn', 'unicycle', 'uniform', 'unify', 'union', 'unison', 'unit', 'unity', 'universe', 'university', 'upas', 'ural', 'uranium', 'urea', 'ureter', 'urethra', 'urine', 'urology', 'urus', 'usage', 'use', 'user', 'usual', 'usurp', 'usury', 'utensil', 'uterus', 'utility', 'utopia', 'utricle', 'uvarovite', 'uvea', 'uvula', | ||
@@ -232,7 +232,7 @@ // Adjectives: u like y | ||
// If the number starts with 11 or 18, the pronunciation is ambiguous | ||
// so check the opts.numbers to see how to render it. Otherwise, if it | ||
// starts with 11 or 18 and has 2, 5, 8, 11, etc. digits, use 'an'. | ||
// Finally, if it starts with an 8, use 'an.' For everything else, | ||
// use 'a.' | ||
// If the number starts with 11 or 18 and is of length 4, | ||
// the pronunciation is ambiguous so check opts.numbers to see | ||
// how to render it. Otherwise, if it starts with 11 or 18 | ||
// and has 2, 5, 8, 11, etc. digits, use 'an.' Finally, if it | ||
// starts with an 8, use 'an.' For everything else, use 'a.' | ||
if (startsWith11Or18 && number.length === 4) { | ||
@@ -239,0 +239,0 @@ article = opts.numbers === 'colloquial' ? 'an' : 'a'; |
@@ -1,1 +0,1 @@ | ||
!function(e,u){"object"==typeof exports&&"object"==typeof module?module.exports=u():"function"==typeof define&&define.amd?define([],u):"object"==typeof exports?exports.indefinite=u():e.indefinite=u()}("undefined"!=typeof self?self:this,function(){return function(e){function u(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,u),r.l=!0,r.exports}var t={};return u.m=e,u.c=t,u.d=function(e,t,n){u.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,u){return Object.prototype.hasOwnProperty.call(e,u)},u.p="",u(u.s=2)}([function(e,u){var t=/^[aeiouAEIOU]/;u.startsWithVowel=function(e){return t.test(e)},u.capitalize=function(e,u,t){return t.capitalize&&(e=""+e.charAt(0).toUpperCase()+e.slice(1)),e+" "+u}},function(e,u){u.check=function(e,t){if(t){var n=new RegExp(t+"$");e=e.replace(n,"")}return u.list.indexOf(e)>-1},u.list=["eunuch","eucalyptus","eugenics","eulogy","euphemism","euphony","euphoria","eureka","european","euphemistic","euphonic","euphoric","euphemistically","euphonically","euphorically","heir","heiress","herb","homage","honesty","honor","honour","hour","honest","honorous","honestly","hourly","one","ouija","once","ubiquity","udometer","ufo","uke","ukelele","ululate","unicorn","unicycle","uniform","unify","union","unison","unit","unity","universe","university","upas","ural","uranium","urea","ureter","urethra","urine","urology","urus","usage","use","usual","usurp","usury","utensil","uterus","utility","utopia","utricle","uvarovite","uvea","uvula","ubiquitous","ugandan","ukrainian","unanimous","unicameral","unified","unique","unisex","universal","urinal","urological","useful","useless","usurious","usurped","utilitarian","utopic","ubiquitously","unanimously","unicamerally","uniquely","universally","urologically","usefully","uselessly","usuriously","yttria","yggdrasil","ylem","yperite","ytterbia","ytterbium","yttrium","ytterbous","ytterbic","yttric"]},function(e,u,t){var n=t(1),r=t(3),i=function(e){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=void 0;return r.some(function(n){if(n.check(e,u))return t=n.run(e,u),!0}),t};i.irregularWords=n.list,e.exports=i},function(e,u,t){e.exports=[t(4),t(5),t(6)]},function(e,u,t){var n=t(0),r=n.capitalize,i=/^([0-9,]+)/,o=/^(11|8|18)/,a=/^(11|18)/;u.check=function(e){return i.test(e)},u.run=function(e,u){var t=e.toString().match(i)[1].replace(/,/g,""),n="a";if(o.test(t)){var s=a.test(t);n=s&&4===t.length?"colloquial"===u.numbers?"an":"a":s&&(t.length-2)%3==0?"an":t.startsWith("8")?"an":"a"}return r(n,e,u)}},function(e,u,t){var n=t(0),r=n.startsWithVowel,i=n.capitalize,o=/^[A-Z]+$/,a=/^[UFHLMNRSX]/,s=function(e){return a.test(e.charAt(0))},c=function(e,u){return e===u};u.check=function(e,u){return!u.caseInsensitive&&o.test(e.split(" ")[0])},u.run=function(e,u){var t=s(e),n=r(e),o=c(n,t)?"a":"an";return i(o,e,u)}},function(e,u,t){var n=t(0),r=n.capitalize,i=n.startsWithVowel,o=t(1),a=/[\s'-]/,s=function(e){return e.split(a)[0].toLowerCase()},c=function(e,u){return(e||u)&&!(e&&u)},l=function(e){return[null,"s","es","ed"].reduce(function(u,t){return u||o.check(e,t)},!1)};u.check=function(){return!0},u.run=function(e,u){var t=s(e),n=l(t),o=c(i(e),n)?"an":"a";return r(o,e,u)}}])}); | ||
!function(e,u){"object"==typeof exports&&"object"==typeof module?module.exports=u():"function"==typeof define&&define.amd?define([],u):"object"==typeof exports?exports.indefinite=u():e.indefinite=u()}("undefined"!=typeof self?self:this,function(){return function(e){function u(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,u),r.l=!0,r.exports}var t={};return u.m=e,u.c=t,u.d=function(e,t,n){u.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,u){return Object.prototype.hasOwnProperty.call(e,u)},u.p="",u(u.s=2)}([function(e,u){var t=/^[aeiouAEIOU]/;u.startsWithVowel=function(e){return t.test(e)},u.capitalize=function(e,u,t){return t.capitalize&&(e=""+e.charAt(0).toUpperCase()+e.slice(1)),e+" "+u}},function(e,u){u.check=function(e,t){if(t){var n=new RegExp(t+"$");e=e.replace(n,"")}return u.list.indexOf(e)>-1},u.list=["eunuch","eucalyptus","eugenics","eulogy","euphemism","euphony","euphoria","eureka","european","euphemistic","euphonic","euphoric","euphemistically","euphonically","euphorically","heir","heiress","herb","homage","honesty","honor","honour","hour","honest","honorous","honestly","hourly","one","ouija","once","ubiquity","udometer","ufo","uke","ukelele","ululate","unicorn","unicycle","uniform","unify","union","unison","unit","unity","universe","university","upas","ural","uranium","urea","ureter","urethra","urine","urology","urus","usage","use","user","usual","usurp","usury","utensil","uterus","utility","utopia","utricle","uvarovite","uvea","uvula","ubiquitous","ugandan","ukrainian","unanimous","unicameral","unified","unique","unisex","universal","urinal","urological","useful","useless","usurious","usurped","utilitarian","utopic","ubiquitously","unanimously","unicamerally","uniquely","universally","urologically","usefully","uselessly","usuriously","yttria","yggdrasil","ylem","yperite","ytterbia","ytterbium","yttrium","ytterbous","ytterbic","yttric"]},function(e,u,t){var n=t(1),r=t(3),i=function(e){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=void 0;return r.some(function(n){if(n.check(e,u))return t=n.run(e,u),!0}),t};i.irregularWords=n.list,e.exports=i},function(e,u,t){e.exports=[t(4),t(5),t(6)]},function(e,u,t){var n=t(0),r=n.capitalize,i=/^([0-9,]+)/,o=/^(11|8|18)/,a=/^(11|18)/;u.check=function(e){return i.test(e)},u.run=function(e,u){var t=e.toString().match(i)[1].replace(/,/g,""),n="a";if(o.test(t)){var s=a.test(t);n=s&&4===t.length?"colloquial"===u.numbers?"an":"a":s&&(t.length-2)%3==0?"an":t.startsWith("8")?"an":"a"}return r(n,e,u)}},function(e,u,t){var n=t(0),r=n.startsWithVowel,i=n.capitalize,o=/^[A-Z]+$/,a=/^[UFHLMNRSX]/,s=function(e){return a.test(e.charAt(0))},c=function(e,u){return e===u};u.check=function(e,u){return!u.caseInsensitive&&o.test(e.split(" ")[0])},u.run=function(e,u){var t=s(e),n=r(e),o=c(n,t)?"a":"an";return i(o,e,u)}},function(e,u,t){var n=t(0),r=n.capitalize,i=n.startsWithVowel,o=t(1),a=/[\s'-]/,s=function(e){return e.split(a)[0].toLowerCase()},c=function(e,u){return(e||u)&&!(e&&u)},l=function(e){return[null,"s","es","ed"].reduce(function(u,t){return u||o.check(e,t)},!1)};u.check=function(){return!0},u.run=function(e,u){var t=s(e),n=l(t),o=c(i(e),n)?"an":"a";return r(o,e,u)}}])}); |
@@ -59,3 +59,3 @@ exports.check = (word, ending) => { | ||
'unify', 'union', 'unison', 'unit', 'unity', 'universe', 'university', 'upas', 'ural', 'uranium', | ||
'urea', 'ureter', 'urethra', 'urine', 'urology', 'urus', 'usage', 'use', 'usual', 'usurp', | ||
'urea', 'ureter', 'urethra', 'urine', 'urology', 'urus', 'usage', 'use', 'user', 'usual', 'usurp', | ||
'usury', 'utensil', 'uterus', 'utility', 'utopia', 'utricle', 'uvarovite', 'uvea', 'uvula', | ||
@@ -62,0 +62,0 @@ |
{ | ||
"name": "indefinite", | ||
"description": "Prefix a noun with an indefinite article - a or an - based on whether it begins with a vowel", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"main": "lib/indefinite.js", | ||
@@ -6,0 +6,0 @@ "browser": "dist/indefinite.js", |
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
47807