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.0.0 to 2.0.1

97

dist/indefinite.js

@@ -1,19 +0,86 @@

(function() {
var isNode = (typeof module !== 'undefined' && this.module !== module);
window["indefinite"] =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {
var indefinite = function (noun, capitalize) {
var phrase = (/[aeiou]/.test(noun.charAt(0).toLowerCase()) ? 'an ' : 'a ') + noun;
if (capitalize) {
return phrase.charAt(0).toUpperCase() + phrase.slice(1);
} else {
return phrase;
}
};
module.exports = function (noun) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
/* istanbul ignore else */
if (isNode) {
module.exports = indefinite;
var isAcronymWithU = opts.caseInsensitive ? false : /^U[A-Z]+$/.test(noun.split(' ')[0]);
var startsWithVowel = /[aeiou]/.test(noun.charAt(0).toLowerCase());
var article = !isAcronymWithU && startsWithVowel ? 'an ' : 'a ';
var phrase = article + noun;
if (opts.capitalize) {
return phrase.charAt(0).toUpperCase() + phrase.slice(1);
} else {
window.indefinite = indefinite;
return phrase;
}
})();
};
/***/ })
/******/ ]);

2

dist/indefinite.min.js

@@ -1,1 +0,1 @@

!function(){var e="undefined"!=typeof module&&this.module!==module,o=function(e,o){var t=(/[aeiou]/.test(e.charAt(0).toLowerCase())?"an ":"a ")+e;return o?t.charAt(0).toUpperCase()+t.slice(1):t};e?module.exports=o:window.indefinite=o}();
window.indefinite=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t){e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!t.caseInsensitive&&/^U[A-Z]+$/.test(e.split(" ")[0]),r=/[aeiou]/.test(e.charAt(0).toLowerCase()),o=!n&&r?"an ":"a ",i=o+e;return t.capitalize?i.charAt(0).toUpperCase()+i.slice(1):i}}]);
{
"name": "indefinite",
"description": "Prefix a noun with an indefinite article - a or an - based on whether it begins with a vowel",
"version": "2.0.0",
"version": "2.0.1",
"main": "lib/indefinite.js",

@@ -6,0 +6,0 @@ "scripts": {

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