@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 912 B
JavaScript
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
import r from"./is-array-like.js";var e=r;function o(r,o,n,i,t){var f,l;if(arguments.length>3){if("closed"!==i&&"open"!==i)throw new TypeError("invalid argument. `left` must be one of the following strings: 'closed' or 'open'. Value: `"+i+"`.");if("closed"!==t&&"open"!==t)throw new TypeError("invalid argument. `right` must be one of the following strings: 'closed' or 'open'. Value: `"+t+"`.")}if(!e(r))return!1;if(0===(f=r.length))return!1;if("closed"===i||void 0===i){if("closed"===t||void 0===t){for(l=0;l<f;l++)if(r[l]<o||r[l]>n)return!1;return!0}for(l=0;l<f;l++)if(r[l]<o||r[l]>=n)return!1;return!0}if("closed"===t||void 0===t){for(l=0;l<f;l++)if(r[l]<=o||r[l]>n)return!1;return!0}for(l=0;l<f;l++)if(r[l]<=o||r[l]>=n)return!1;return!0}var n=o;export default n;
//# sourceMappingURL=is-between-array.js.map