Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

indefinite

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

indefinite - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

8

dist/indefinite.js

@@ -129,2 +129,6 @@ (function webpackUniversalModuleDefinition(root, factory) {

word = word.replace(regex, '');
if (word.length <= 1) {
return false;
}
}

@@ -164,4 +168,4 @@

// 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', 'urologist', 'urology', 'urus', 'usage', 'use', 'user', 'usual', 'usurp', 'usury', 'utensil', 'uterus', 'utility', 'utopia', 'utricle', 'uvarovite', 'uvea', 'uvula', 'utah', 'utahn', // Adjectives: u like y
'ubiquitous', 'ugandan', 'ukrainian', 'unanimous', 'unicameral', 'unified', 'unique', 'unisex', 'universal', 'urinal', 'urological', 'useful', 'useless', 'usurious', 'usurped', 'utilitarian', 'utopic', // Adverbs: 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', 'urologist', 'urology', 'urus', 'usage', 'use', 'user', 'usual', 'usurp', 'usurper', 'usury', 'utensil', 'uterus', 'utility', 'utopia', 'utricle', 'uvarovite', 'uvea', 'uvula', 'utah', 'utahn', // Adjectives: u like y
'ubiquitous', 'ugandan', 'ukrainian', 'unanimous', 'unicameral', 'unified', 'unique', 'unisex', 'universal', 'urinal', 'urological', 'useful', 'useless', 'usurious', 'utilitarian', 'utopic', // Adverbs: u like y
'ubiquitously', 'unanimously', 'unicamerally', 'uniquely', 'universally', 'urologically', 'usefully', 'uselessly', 'usuriously', // Nouns: y like i

@@ -168,0 +172,0 @@ 'yttria', 'yggdrasil', 'ylem', 'yperite', 'ytterbia', 'ytterbium', 'yttrium', // Adjectives: y like i

@@ -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()}(window,(function(){return function(e){var u={};function t(n){if(u[n])return u[n].exports;var r=u[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=u,t.d=function(e,u,n){t.o(e,u)||Object.defineProperty(e,u,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,u){if(1&u&&(e=t(e)),8&u)return e;if(4&u&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&u&&"string"!=typeof e)for(var r in e)t.d(n,r,function(u){return e[u]}.bind(null,r));return n},t.n=function(e){var u=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(u,"a",u),u},t.o=function(e,u){return Object.prototype.hasOwnProperty.call(e,u)},t.p="",t(t.s=2)}([function(e,u){var t=/^[aeiouAEIOU]/;u.startsWithVowel=function(e){return t.test(e)},u.capitalize=function(e,u){return u.capitalize&&(e="".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))),e}},function(e,u){u.check=function(e,t){if(t){var n=new RegExp("".concat(t,"$"));e=e.replace(n,"")}return u.list.indexOf(e)>-1},u.list=["eunuch","eucalyptus","eugenics","eulogy","euphemism","euphony","euphoria","eureka","euro","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","urologist","urology","urus","usage","use","user","usual","usurp","usury","utensil","uterus","utility","utopia","utricle","uvarovite","uvea","uvula","utah","utahn","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","f","h","l","m","n","r","s","u","x"]},function(e,u,t){var n=t(0).capitalize,r=t(1),i=t(3),o=function(e){var u,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i.some((function(n){if(n.check(e,t))return u=n.run(e,t),!0})),a(u,t,e)},a=function(e,u,t){return e=n(e,u),u.articleOnly?e:"".concat(e," ").concat(t)};o.irregularWords=r.list,e.exports=o},function(e,u,t){e.exports=[t(4),t(5),t(6)]},function(e,u){var t=/^([0-9,]+)/,n=/^(11|8|18)/,r=/^(11|18)/;u.check=function(e){return t.test(e)},u.run=function(e,u){var i=e.toString().match(t)[1].replace(/,/g,""),o="a";if(n.test(i)){var a=r.test(i);o=a&&4===i.length?"colloquial"===u.numbers?"an":"a":a&&(i.length-2)%3==0||i.startsWith("8")?"an":"a"}return o}},function(e,u,t){var n=t(0).startsWithVowel,r=/^[A-Z]+$/,i=/^[UFHLMNRSX]/;u.check=function(e,u){return!u.caseInsensitive&&r.test(e.split(" ")[0])},u.run=function(e){var u=function(e){return i.test(e.charAt(0))}(e),t=n(e);return t===u?"a":"an"}},function(e,u,t){var n=t(0).startsWithVowel,r=t(1),i=/[\s'-]/;u.check=function(){return!0},u.run=function(e,u){var t,o,a,c=function(e){return e.split(i)[0].toLowerCase()}(e),l=(t=c,[null,"s","es","ed"].reduce((function(e,u){return e||r.check(t,u)}),!1));return o=n(e),a=l,!o&&!a||o&&a?"a":"an"}}])}));
!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()}(window,(function(){return function(e){var u={};function t(n){if(u[n])return u[n].exports;var r=u[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=u,t.d=function(e,u,n){t.o(e,u)||Object.defineProperty(e,u,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,u){if(1&u&&(e=t(e)),8&u)return e;if(4&u&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&u&&"string"!=typeof e)for(var r in e)t.d(n,r,function(u){return e[u]}.bind(null,r));return n},t.n=function(e){var u=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(u,"a",u),u},t.o=function(e,u){return Object.prototype.hasOwnProperty.call(e,u)},t.p="",t(t.s=2)}([function(e,u){var t=/^[aeiouAEIOU]/;u.startsWithVowel=function(e){return t.test(e)},u.capitalize=function(e,u){return u.capitalize&&(e="".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))),e}},function(e,u){u.check=function(e,t){if(t){var n=new RegExp("".concat(t,"$"));if((e=e.replace(n,"")).length<=1)return!1}return u.list.indexOf(e)>-1},u.list=["eunuch","eucalyptus","eugenics","eulogy","euphemism","euphony","euphoria","eureka","euro","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","urologist","urology","urus","usage","use","user","usual","usurp","usurper","usury","utensil","uterus","utility","utopia","utricle","uvarovite","uvea","uvula","utah","utahn","ubiquitous","ugandan","ukrainian","unanimous","unicameral","unified","unique","unisex","universal","urinal","urological","useful","useless","usurious","utilitarian","utopic","ubiquitously","unanimously","unicamerally","uniquely","universally","urologically","usefully","uselessly","usuriously","yttria","yggdrasil","ylem","yperite","ytterbia","ytterbium","yttrium","ytterbous","ytterbic","yttric","f","h","l","m","n","r","s","u","x"]},function(e,u,t){var n=t(0).capitalize,r=t(1),i=t(3),o=function(e){var u,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i.some((function(n){if(n.check(e,t))return u=n.run(e,t),!0})),a(u,t,e)},a=function(e,u,t){return e=n(e,u),u.articleOnly?e:"".concat(e," ").concat(t)};o.irregularWords=r.list,e.exports=o},function(e,u,t){e.exports=[t(4),t(5),t(6)]},function(e,u){var t=/^([0-9,]+)/,n=/^(11|8|18)/,r=/^(11|18)/;u.check=function(e){return t.test(e)},u.run=function(e,u){var i=e.toString().match(t)[1].replace(/,/g,""),o="a";if(n.test(i)){var a=r.test(i);o=a&&4===i.length?"colloquial"===u.numbers?"an":"a":a&&(i.length-2)%3==0||i.startsWith("8")?"an":"a"}return o}},function(e,u,t){var n=t(0).startsWithVowel,r=/^[A-Z]+$/,i=/^[UFHLMNRSX]/;u.check=function(e,u){return!u.caseInsensitive&&r.test(e.split(" ")[0])},u.run=function(e){var u=function(e){return i.test(e.charAt(0))}(e),t=n(e);return t===u?"a":"an"}},function(e,u,t){var n=t(0).startsWithVowel,r=t(1),i=/[\s'-]/;u.check=function(){return!0},u.run=function(e,u){var t,o,a,c=function(e){return e.split(i)[0].toLowerCase()}(e),l=(t=c,[null,"s","es","ed"].reduce((function(e,u){return e||r.check(t,u)}),!1));return o=n(e),a=l,!o&&!a||o&&a?"a":"an"}}])}));

@@ -6,2 +6,6 @@ exports.check = (word, ending) => {

word = word.replace(regex, '');
if (word.length <= 1) {
return false;
}
}

@@ -61,7 +65,8 @@

'urea', 'ureter', 'urethra', 'urine', 'urologist', 'urology', 'urus', 'usage', 'use', 'user', 'usual', 'usurp',
'usury', 'utensil', 'uterus', 'utility', 'utopia', 'utricle', 'uvarovite', 'uvea', 'uvula', 'utah', 'utahn',
'usurper', 'usury', 'utensil', 'uterus', 'utility', 'utopia', 'utricle', 'uvarovite', 'uvea', 'uvula', 'utah',
'utahn',
// Adjectives: u like y
'ubiquitous', 'ugandan', 'ukrainian', 'unanimous', 'unicameral', 'unified', 'unique', 'unisex',
'universal', 'urinal', 'urological', 'useful', 'useless', 'usurious', 'usurped', 'utilitarian',
'universal', 'urinal', 'urological', 'useful', 'useless', 'usurious', 'utilitarian',
'utopic',

@@ -68,0 +73,0 @@

{
"name": "indefinite",
"description": "Prefix a noun with an indefinite article - a or an - based on whether it begins with a vowel",
"version": "2.4.1",
"version": "2.4.2",
"main": "lib/indefinite.js",
"browser": "dist/indefinite.js",
"scripts": {
"test": "gulp",
"test": "NODE_OPTIONS=--openssl-legacy-provider gulp",
"travis": "gulp ci",

@@ -47,3 +47,3 @@ "build": "webpack --mode production",

"gulp-rename": "^2.0.0",
"karma": "^5.2.1",
"karma": "^6.3.14",
"karma-chrome-launcher": "^3.1.0",

@@ -50,0 +50,0 @@ "karma-firefox-launcher": "^1.3.0",

@@ -132,2 +132,8 @@ require('should');

context('a regular word that happens to have an ending we strip (s, es, ed)', () => {
it('should ignore the ending', () => {
indefinite('red rum').should.equal('a red rum');
});
});
context('an irregular word with some capitalization is passed', () => {

@@ -134,0 +140,0 @@ it('should be treated case-insensitively', () => {

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