Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.2.0 #178

Merged
merged 23 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2f54703
Updated: Slight improvement to internal xwrap function
dhershman1 Sep 24, 2024
bd7df6f
Updated: amend to use spread instead of assign
dhershman1 Oct 3, 2024
795b7b2
Updated: map to use while loop
dhershman1 Oct 3, 2024
e6afca3
Added: Another pipeP test
dhershman1 Oct 3, 2024
086ff1b
Added: New objOf function
dhershman1 Oct 3, 2024
214e3d0
Updated: package json and changelog
dhershman1 Oct 3, 2024
0910abe
Added: More pipe tests
dhershman1 Oct 13, 2024
b55abad
Chore: Update dependencies
dhershman1 Oct 13, 2024
6ec89b5
Chore: Rename all tests from *.js to *.spec.js
dhershman1 Oct 13, 2024
585d94a
Chore: Test runner now uses .spec.js
dhershman1 Oct 13, 2024
6f3193d
Removed: rename script
dhershman1 Oct 13, 2024
450af5c
Update: swap ordering on amend
dhershman1 Oct 13, 2024
cba3d9d
Updated: Expanded upon keys tests
dhershman1 Oct 13, 2024
99cd042
Chore: Bring back coverage and convert to c8 module for it
dhershman1 Oct 13, 2024
0510709
Update: Deprecate fuzzySearch
dhershman1 Oct 13, 2024
fa59b5a
Update: Changelog
dhershman1 Oct 13, 2024
0ef4885
Added: New takeLast test
dhershman1 Oct 13, 2024
95f6acd
Added: coverage scripts to package.json
dhershman1 Oct 13, 2024
6807c98
Added: coverage reporting to workflow
dhershman1 Oct 13, 2024
2febe17
Updated: Changelog and README
dhershman1 Oct 13, 2024
79f145b
Update: Workflow versions, added codecov yml
dhershman1 Oct 14, 2024
80d72cf
Added: codecov bundler metrics, removed with on workflow
dhershman1 Oct 14, 2024
9b82983
Removed: Bundle analyzer as it isn't working
dhershman1 Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"exclude": [
"src/_internals",
"tests"
],
"reporter": [
"lcov"
]
}
126 changes: 66 additions & 60 deletions .github/workflows/kyanite.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,66 @@
name: Kyanite CI

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]

jobs:

test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Check node_module Cache
id: node-module-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.node-module-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Test
run: npm test
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Check node_module Cache
id: node-module-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.node-module-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Lint
run: npm run lint
name: Kyanite CI

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]

jobs:

test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Check node_module Cache
id: node-module-cache
uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.node-module-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Test
run: npm run test:cov
- name: Run Report
run: npm run report
- name: Check Coverage
run: npm run coverage
- name: Upload Coverage
uses: codecov/codecov-action@v4
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Check node_module Cache
id: node-module-cache
uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.node-module-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Lint
run: npm run lint
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## v3.2.0

### New

- Added `objOf` function
- Creates a new object based on the key value pair provided
- `fuzzySearch` has been `Deprecated` as of this version and will be removed in `v4.0.0`

### Improved

- `amend` now uses Object spread rather than `Object.assign` for that small performance boost
- When using `Object.assign` with an empty object, Object spread is consistently faster
- Converted map to use a `while` loop assoc combo
- Moved `*.js` -> `*.spec.js` for unit tests
- Expanded upon some more tests to get to 100% coverage

## v3.1.0

### New
Expand Down
223 changes: 113 additions & 110 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,110 +1,113 @@
<p align=center>
<a href="https://kyanite.dusty.codes/" title="Kyanite Documentation">
<img alt="Kyanite Logo" src="https://user-images.githubusercontent.com/8997380/48008308-69174500-e0e7-11e8-9a57-ebd558f094f8.png">
</a>
</p>
<br />
<p align=center>
A light weight functional JavaScript library that only depends on itself.
</p>
<p align=center>
<a href="./LICENSE">
<img
alt="license:mit"
src="https://img.shields.io/badge/license-mit-green.svg?style=flat-square"
/>
</a>
<a href="https://kyanite.dusty.codes/">
<img alt="Netlify Status" src="https://api.netlify.com/api/v1/badges/fc0f65da-107d-43d4-9cb3-d74f46f2b472/deploy-status">
</a>
<a href="https://www.npmjs.com/package/kyanite">
<img alt="Npm Version" src="https://img.shields.io/npm/v/kyanite.svg?style=flat-square">
</a>
<a href="https://github.com/dhershman1/kyanite/actions/workflows/kyanite.yml">
<img alt="Build Status" src="https://img.shields.io/github/actions/workflow/status/dhershman1/kyanite/kyanite.yml?style=flat-square">
</a>
<a href="https://codebeat.co/projects/github-com-dhershman1-kyanite-master">
<img alt="codebeat badge" src="https://codebeat.co/badges/4eeb4e32-dfe2-4d12-ac1a-bd13cf31ee55" />
</a>
</p>
<br />
<p align=center>
<a href="https://github.com/standard/standard">
<img alt="Standard JS" src="https://cdn.rawgit.com/standard/standard/master/badge.svg">
</a>
</p>

## Why The Name Kyanite?

Because I think mineral names are cool

## Contents

- [View the Changelog](https://github.com/dhershman1/kyanite/blob/master/CHANGELOG.md)
- [View the Documentation](https://kyanite.dusty.codes)
- [Philosophy](#philosophy)
- [Key Features](#key-features)
- [How To](#how-to)
- [Testing](#testing)
- [Credit](#credit)

## Philosophy

The goal for Kyanite is to be stripped down, light weight, and intuitive. The idea is to be performant and easy to use in a functional setting, making it simple to build reusable functions in your code base with powerful and organized algorithmic pipes. Ultimately, Kyanite’s continued growth and improvement will support the growth and improvement of the JavaScript community

## Key Features

- Purely Functional - This was a main focus for the project. I wanted it to be an easy to use, functional system while also being completely pure by making use of piping and transducers to boost performance.
- Single type utility functions - Theoretically, all of the functionality is based around accepting a single data type, doing what it does, and giving you back a result, thus making it reliable, stable, and lightweight.
- Everything is curried! Setup static in one spot and then pass the rest of the dynamic data in later.
- Data last ideology

## How To

> **Note:** As of `v2.0.0` the module should be imported as just `K` instead of `kyanite`
> The unminified version of the library is no longer available as of 2.0.0

With a CDN

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

<script>
K.isEmpty({})
</script>
```

Or installing with `npm i kyanite` and then:

Standard module system

```js
// This will use the module path in the package.json (src/index.js)
import * as K from 'kyanite'
```

Common JS

```js
// For the prod minified version
const K = require('kyanite')
```

## Testing

Kyanite follows the [tap](http://testanything.org/) setup using the [tape](https://github.com/substack/tape) testing suite.

To run the tests:

- `git clone` the repo
- `cd` into the repo folder
- Run `npm i`
- Run `npm t`

## Credit

A lot of the if not most of the inspiration 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 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 beautiful and feature packed library where the original idea started
<p align=center>
<a href="https://kyanite.dusty.codes/" title="Kyanite Documentation">
<img alt="Kyanite Logo" src="https://user-images.githubusercontent.com/8997380/48008308-69174500-e0e7-11e8-9a57-ebd558f094f8.png">
</a>
</p>
<br />
<p align=center>
A light weight functional JavaScript library that only depends on itself.
</p>
<p align=center>
<a href="./LICENSE">
<img
alt="license:mit"
src="https://img.shields.io/badge/license-mit-green.svg?style=flat-square"
/>
</a>
<a href="https://codecov.io/gh/dhershman1/kyanite" >
<img src="https://codecov.io/gh/dhershman1/kyanite/branch/master/graph/badge.svg?token=fF0sm70rWH"/>
</a>
<a href="https://kyanite.dusty.codes/">
<img alt="Netlify Status" src="https://api.netlify.com/api/v1/badges/fc0f65da-107d-43d4-9cb3-d74f46f2b472/deploy-status">
</a>
<a href="https://www.npmjs.com/package/kyanite">
<img alt="Npm Version" src="https://img.shields.io/npm/v/kyanite.svg?style=flat-square">
</a>
<a href="https://github.com/dhershman1/kyanite/actions/workflows/kyanite.yml">
<img alt="Build Status" src="https://img.shields.io/github/actions/workflow/status/dhershman1/kyanite/kyanite.yml?style=flat-square">
</a>
<a href="https://codebeat.co/projects/github-com-dhershman1-kyanite-master">
<img alt="codebeat badge" src="https://codebeat.co/badges/4eeb4e32-dfe2-4d12-ac1a-bd13cf31ee55" />
</a>
</p>
<br />
<p align=center>
<a href="https://github.com/standard/standard">
<img alt="Standard JS" src="https://cdn.rawgit.com/standard/standard/master/badge.svg">
</a>
</p>

## Why The Name Kyanite?

Because I think mineral names are cool

## Contents

- [View the Changelog](https://github.com/dhershman1/kyanite/blob/master/CHANGELOG.md)
- [View the Documentation](https://kyanite.dusty.codes)
- [Philosophy](#philosophy)
- [Key Features](#key-features)
- [How To](#how-to)
- [Testing](#testing)
- [Credit](#credit)

## Philosophy

The goal for Kyanite is to be stripped down, light weight, and intuitive. The idea is to be performant and easy to use in a functional setting, making it simple to build reusable functions in your code base with powerful and organized algorithmic pipes. Ultimately, Kyanite’s continued growth and improvement will support the growth and improvement of the JavaScript community

## Key Features

- Purely Functional - This was a main focus for the project. I wanted it to be an easy to use, functional system while also being completely pure by making use of piping and transducers to boost performance.
- Single type utility functions - Theoretically, all of the functionality is based around accepting a single data type, doing what it does, and giving you back a result, thus making it reliable, stable, and lightweight.
- Everything is curried! Setup static in one spot and then pass the rest of the dynamic data in later.
- Data last ideology

## How To

> **Note:** As of `v2.0.0` the module should be imported as just `K` instead of `kyanite`
> The unminified version of the library is no longer available as of 2.0.0

With a CDN

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

<script>
K.isEmpty({})
</script>
```

Or installing with `npm i kyanite` and then:

Standard module system

```js
// This will use the module path in the package.json (src/index.js)
import * as K from 'kyanite'
```

Common JS

```js
// For the prod minified version
const K = require('kyanite')
```

## Testing

Kyanite follows the [tap](http://testanything.org/) setup using the [tape](https://github.com/substack/tape) testing suite.

To run the tests:

- `git clone` the repo
- `cd` into the repo folder
- Run `npm i`
- Run `npm t`

## Credit

A lot of the if not most of the inspiration 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 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 beautiful and feature packed library where the original idea started
Loading