Skip to content

Commit

Permalink
Merge pull request #10 from dhershman1/development
Browse files Browse the repository at this point in the history
Development v3.2.3
  • Loading branch information
dhershman1 authored Nov 19, 2020
2 parents 6c1cbee + 0123691 commit 8c52109
Show file tree
Hide file tree
Showing 25 changed files with 4,009 additions and 5,187 deletions.
59 changes: 58 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ orbs:
jobs:
build:
docker:
- image: circleci/node:10.5
- image: circleci/node:14.15

working_directory: ~/phonefns

Expand Down Expand Up @@ -42,6 +42,48 @@ jobs:
- run:
name: Check Coverage
command: npm run check-cov
docs:
docker:
# specify the version you desire here
- image: circleci/node:14.15
working_directory: ~/phonefns
steps:
- checkout

#Install deps
- run:
name: Install Dependencies
command: npm ci

# Build docs
- run:
name: Build docs
command: npm run docs

- persist_to_workspace:
root: .
paths:
- docs/*
docs-deploy:
docker:
- image: circleci/node:14.15
working_directory: ~/phonefns
steps:
- checkout
- attach_workspace:
at: ~/phonefns
- add_ssh_keys:
fingerprints:
- "19:50:ad:f5:95:2f:b3:82:5b:4d:4b:30:45:2e:d3:38"
- run:
name: Install gh-pages and Configure
command: |
npm i -D gh-pages
git config user.email "[email protected]"
git config user.name "ci-build"
- run:
name: Deploy Docs
command: npm run docs:deploy
workflows:
version: 2
main:
Expand All @@ -52,3 +94,18 @@ workflows:
only:
- master
- development
ignore: gh-pages
deploy_docs:
jobs:
- docs:
filters:
branches:
only: master
ignore: gh-pages
- docs-deploy:
requires:
- docs
filters:
branches:
only: master
ignore: gh-pages
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
docs/

# Logs
logs
*.log
Expand Down Expand Up @@ -56,4 +58,3 @@ typings/

# dotenv environment variables file
.env

8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![npm](https://img.shields.io/npm/v/phone-fns.svg?style=flat-square)](https://www.npmjs.com/package/phone-fns)
[![David](https://img.shields.io/david/dhershman1/phone-fns.svg?style=flat-square)](https://david-dm.org/dhershman1/phone-fns)
[![CircleCI](https://circleci.com/gh/dhershman1/phone-fns.svg?style=svg)](https://circleci.com/gh/dhershman1/phone-fns)
[![codecov](https://codecov.io/gh/dhershman1/phone-fns/branch/master/graph/badge.svg)](https://codecov.io/gh/dhershman1/phone-fns)

Expand Down Expand Up @@ -27,13 +26,6 @@ Common JS
const phoneFns = require('phone-fns')
```

CDN

```html
<!-- It is recommended to replace the @latest with a strict version number for production -->
<script src="https://cdn.jsdelivr.net/npm/phone-fns@latest/dist/phone-fns.min.js"></script>
```

Through the browser

```html
Expand Down
15 changes: 15 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## v3.2.3

### New

- Switched over to [pinet](https://github.com/dhershman1/pinet) jsdoc templating
- Changed documentation hosting

### Improved

- All dependencies have been updated
- Removed docs folder
- Removed david-dm badge since it doesn't seem to be coming back
- Documentation workflow now handled by circleci
- `format` can now take in `Number` type phone numbers

## v3.2.2

- Dev dependency fixes
Expand Down
30 changes: 22 additions & 8 deletions dist/phone-fns.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('kyanite')) :
typeof define === 'function' && define.amd ? define(['exports', 'kyanite'], factory) :
(global = global || self, factory(global.phoneFns = {}, global.kyanite));
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.phoneFns = {}, global.kyanite));
}(this, (function (exports, kyanite) { 'use strict';

function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
}

function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}

function _iterableToArrayLimit(arr, i) {
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
return;
}

if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _arr = [];
var _n = true;
var _d = false;
Expand All @@ -42,8 +39,25 @@
return _arr;
}

function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}

function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;

for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];

return arr2;
}

function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

var uglify = kyanite.compose(kyanite.replace(/[a-z]\w?|\W/gi, ''), String);
Expand Down Expand Up @@ -113,7 +127,7 @@
var format = function format(layout, phone) {
var cCount = kyanite.includes('C', layout) ? kyanite.length(layout.match(/C/g)) : 0;
var _reduce = kyanite.addIndex(kyanite.reduce);
return kyanite.branch(kyanite.both(kyanite.complement(isValid), kyanite.complement(validFormat(layout))), kyanite.identity, kyanite.pipe([kyanite.split(''), uglify, _reduce(function (d, acc, i) {
return kyanite.branch(kyanite.both(kyanite.complement(isValid), kyanite.complement(validFormat(layout))), kyanite.identity, kyanite.pipe([uglify, kyanite.split(''), _reduce(function (d, acc, i) {
return kyanite.gt(i, cCount) ? kyanite.replace(/C/i, d, acc) : kyanite.replace(/N/i, d, acc);
}, layout)]), phone);
};
Expand Down
2 changes: 1 addition & 1 deletion dist/phone-fns.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 0 additions & 115 deletions docs/breakdown.js.html

This file was deleted.

Loading

0 comments on commit 8c52109

Please sign in to comment.