Skip to content

Commit

Permalink
Merge pull request #119 from dhershman1/development
Browse files Browse the repository at this point in the history
Development v0.13.0
  • Loading branch information
dhershman1 authored May 25, 2019
2 parents 92524aa + c5a2651 commit 07078b1
Show file tree
Hide file tree
Showing 190 changed files with 1,256 additions and 49,158 deletions.
57 changes: 57 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,48 @@ jobs:
- run:
name: coverage
command: npm run check-cov
docs:
docker:
# specify the version you desire here
- image: circleci/node:10.5
working_directory: ~/kyanite
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:10.5
working_directory: ~/kyanite
steps:
- checkout
- attach_workspace:
at: ~/kyanite
- add_ssh_keys:
fingerprints:
- "05:16:6f:2d:1d:63:40:9a:42:f2:e8:8f:90:22:da:15"
- run:
name: Install gh-pages and Configure
command: |
npm i -D gh-pages
git config user.email "ci-build@dusty.codes"
git config user.name "ci-build"
- run:
name: Deploy Docs
command: npm run docs:deploy
workflows:
version: 2
main:
Expand All @@ -57,3 +99,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
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## v0.13.0

### BREAKING CHANGES

- `find` has gone back to returning `undefined` instead of `null` for not found values

### New

- Added `fold` function which runs a `reduce` without an initial accumulator
- Added the `propOr` Function which returns the value of a property from an object or the provided default value
- CircleCI will now handle publishing the documentation to the `gh-pages` branch

### Fixed

- Documentation for functions showing up `deprecated` when they were actually not
- Documentation for `join` moved it to the `Array` Category, and fixed a typo in it's example
- Documentation for `apply` showed incorrect curry examples

### Improved

- `min` is now using the `fold` function
- Finally improved the documentation process so now documentation changes won't flood the PRs!

## v0.12.2

### New
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</p>
<br />
<p align=center>
A light weight pure functional library with single type utility functions and it only depends on itself.
A light weight functional JavaScript library that only depends on itself.
</p>
<p align=center>
<a href="./LICENSE">
Expand Down Expand Up @@ -123,5 +123,5 @@ To run the tests:

A lot of the if not most of the inpiration for this library came from 2 libraries I follow closely, Primarily most of it stems from:

- [foreword](https://github.com/abstract-tools/foreword) by [Abstract Tools](https://github.com/abstract-tools) which is a very nice and easy to use library developed by a close friend. This is where a lot of functionality, AND the idea of a pure single data type system came from I can't recommend it enough.
- [foreword](https://github.com/abstract-tools/foreword) by [Abstract Tools](https://github.com/abstract-tools) which is a very nice and easy to use library developed by a close friend and mentor. This is where a lot of functionality ideas came from I can't recommend it enough.
- [Ramdajs](http://ramdajs.com/) by [Ramda](https://github.com/ramda) a large and fairly handy library where the original idea sparked
46 changes: 30 additions & 16 deletions dist/kyanite.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
var find = function find(fn, arr) {
return reduce$1(function (val, acc) {
return fn(val) ? reduced(val) : acc;
}, null, arr);
}, undefined, arr);
};
var find$1 = _curry2(find);

Expand All @@ -220,6 +220,16 @@
};
var findIndex$1 = _curry2(findIndex);

var flip = function flip(fn, a, b) {
return fn(b, a);
};
var flip$1 = _curry3(flip);

var fold = function fold(fn, arr) {
return arr.reduce(flip$1(fn));
};
var fold$1 = _curry2(fold);

var insert = function insert(i, d, arr) {
var idx = i < arr.length && i >= 0 ? i : arr.length;
var result = arr.slice(0);
Expand Down Expand Up @@ -258,6 +268,11 @@
};
var intersection$1 = _curry2(intersection);

var join = function join(str, list) {
return list.join(str);
};
var join$1 = _curry2(join);

function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
Expand Down Expand Up @@ -377,11 +392,9 @@
};
var maxBy$1 = _curry2(maxBy);

var min = function min(list) {
return list.reduce(function (a, b) {
return a <= b ? a : b;
});
};
var min = fold$1(function (a, b) {
return a <= b ? a : b;
});

var minBy = function minBy(fn, list) {
return list.reduce(function (a, b) {
Expand Down Expand Up @@ -818,11 +831,6 @@
};
var eqBy$1 = _curry3(eqBy);

var flip = function flip(fn, a, b) {
return fn(b, a);
};
var flip$1 = _curry3(flip);

var gt = function gt(a, b) {
return b > a;
};
Expand Down Expand Up @@ -1142,6 +1150,15 @@
};
var propEq$1 = _curry3(propEq);

var propOr = function propOr(def, key, obj) {
var val = prop$1(key, obj);
if (isNil(val)) {
return def;
}
return val;
};
var propOr$1 = _curry3(propOr);

var props = function props(keys, obj) {
return map$1(function (k) {
return obj[k];
Expand Down Expand Up @@ -1190,11 +1207,6 @@
};
var fuzzySearch$1 = _curry2(fuzzySearch);

var join = function join(str, list) {
return list.join(str);
};
var join$1 = _curry2(join);

var match = function match(reg, str) {
return str.match(reg);
};
Expand Down Expand Up @@ -1276,6 +1288,7 @@
exports.findIndex = findIndex$1;
exports.first = first;
exports.flip = flip$1;
exports.fold = fold$1;
exports.fuzzySearch = fuzzySearch$1;
exports.gcd = gcd$1;
exports.groupBy = groupBy$1;
Expand Down Expand Up @@ -1331,6 +1344,7 @@
exports.product = product;
exports.prop = prop$1;
exports.propEq = propEq$1;
exports.propOr = propOr$1;
exports.props = props$1;
exports.range = range$1;
exports.reduce = reduce$1;
Expand Down
Loading

0 comments on commit 07078b1

Please sign in to comment.