UNPKG

@actinc/dls

Version:

Design Language System (DLS) for ACT & Encoura front-end projects.

25 lines 891 B
/** * Copyright (c) ACT, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); }; export var oxfordCommaJoin = function (input) { var clone = __spreadArray([], input, true); if (input.length <= 2) { return clone.join(' and '); } var last = clone.pop(); return "".concat(clone.join(', '), ", and ").concat(last); }; export default oxfordCommaJoin; //# sourceMappingURL=index.js.map