open-index/open-npm huggingface dataset:
npm package: @sugarat/easypicker2-server
Description: EasyPicker（轻取）- 服务端
Author: ATQQ
Latest version: 2.7.3

<!-- <p align="center">
 	<a href="https://ep.sugarat.top">
		<img width="50%" src="https://img.cdn.sugarat.top/mdImg/MTY0NzY5OTk0NTY1NQ==647699945655"
			 alt="Status">
	</a>
</p> -->

<h1 align="center">EasyPicker（轻取）</h1>

<p align="center">为提高在线文件收取效率而生</p>
<p align="center">
 	<a href="https://ep.sugarat.top">
		<img src="https://img.shields.io/badge/status-updating-success.svg"
			 alt="Status">
	</a>
</p>

![](https://img.cdn.sugarat.top/mdImg/MTY3ODAwMzU3MTc2Ng==678003571766)

> 此仓库为`轻取`的服务端仓库
## 简介
[在线文件收取平台](https://ep.sugarat.top)

应用开源，支持[私有化部署](https://docs.ep.sugarat.top/)

## 快速体验
* [应用主页](https://ep2.sugarat.top)
* [提交文件](https://ep2.sugarat.top/task/627bd3b18a567f1b47bcdace)

## 项目背景
校园学习或者工作场景中会出现以下几个场景:
* 每次碰到上机课的时候,都会遇到收取实验报告。
* 需要收取每个人填写的各种电子表格。
* 需要通过QQ/微信等等收集各种截图
* 类似场景还有不少就不列举了。。。

通常的方式是,通过QQ/微信/邮箱等收取,弊端显而易见,太过于麻烦且不方便整理统计。还占用电脑/手机内存。为了解决这个问题,此项目应运而生。


欢迎[体验](https://ep.sugarat.top)分享

<img width="25%" src="https://img.cdn.sugarat.top/TIM图片20191015225526-20191015.gif"/>

## 赞赏
如果觉得项目还ok，可以请作者喝 `茶`，支持一下

| 赞赏                                                                                                  | 加微信                                                                           |
| ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| <p align="center"><img src="https://img.cdn.sugarat.top/mdImg/MTY1MTU0Nzc1NDQ3Mw==651547754473"/></p> | <img src="https://img.cdn.sugarat.top/mdImg/MTYxOTE1NTk3MTkyNA==619155971925" /> |



## 反馈
* [问卷反馈](https://www.wenjuan.com/s/UZBZJvA040/)
* [提需求](https://ep.sugarat.top/wish)

## 相关文档
* [开发规划](https://docs.ep.sugarat.top/plan/todo.html)
* [本地启动&线上部署指南](https://docs.ep.sugarat.top/)
* [接口文档](https://easy2.w.eolink.com/share/index?shareCode=7SF9Na)
* [数据库设计文档](https://github.com/ATQQ/easypicker2-server/tree/master/docs)
* [更新日志](https://docs.ep.sugarat.top/plan/log.html)

## 相关地址
注：两环境数据不互通,新功能会先在测试环境进行实验

1. 正式环境：
   * https://ep.sugarat.top
   * https://ep2.sugarat.top
2. 测试环境：
   * https://ep.test.sugarat.top
   * https://ep.dev.sugarat.top

## 其它信息
### 技术栈
* 前端:Vue3,Typescript,Vite - [模板仓库](https://github.com/ATQQ/vite-vue3-template)
* 服务端:Typescript,Node.js - [模板仓库](https://github.com/ATQQ/node-server)
### 相关仓库
#### EasyPicker1.0（已下线）
1. ~~服务端(Java-已弃用)：https://github.com/ATQQ/EasyPicker~~
2. 客户端(web) ：https://github.com/ATQQ/EasyPicker-webpack
3. 服务端（Node.js）：https://github.com/ATQQ/easypicker-server

#### [EasyPicker2.0](https://ep2.sugarat.top)
1. 客户端(Web):https://github.com/ATQQ/easypicker2-client
2. 服务端(Node.js):https://github.com/ATQQ/easypicker2-server
npm package: @sugarat/es-check
Description: Check JavaScript&HTML files ES version against a specified ES version 🏆
Author: ATQQ
Latest version: 0.1.2

# @sugarat/es-check

Check JavaScript&HTML files ES version against a specified ES version 🏆

reference [es-check](https://github.com/yowainwright/es-check),but this is strong and friendly
## Get Started
### By CLI
```sh
npm i @sugarat/es-check --save-dev   # locally
npm i @sugarat/es-check -g           # or globally
```
Check if an array or glob of files matches a specified ES version.

* **Note:** adds quotation around globs. Globs are patterns like so, `<something>/*.js` `<something>/*.html`.
```sh
escheck es5 testProject/**/*.js testProject/**/*.html
```
The ES Check script (above) checks `testProject/**/*.js testProject/**/*.html` files to see if they're ES5. It throws an error and logs files are that do not pass the check.

output terminal

![图片](https://img.cdn.sugarat.top/mdImg/MTY2NDM3ODMyNjc0OQ==664378326749)

output log file

```sh
escheck es5 testProject/**/*.js testProject/**/*.html --out
```

![图片](https://img.cdn.sugarat.top/mdImg/MTY2NDM3ODU2NzI1OA==664378567258)

## CLI Options
```sh
escheck --help
```
```sh
Usage: bin [options] [ecmaVersion] [files...]

Arguments:
  ecmaVersion            ecmaVersion to check files against. Can be: es3, es4, es5, es6/es2015, es7/es2016, es8/es2017, es9/es2018, es10/es2019 .etc
  files                  a glob of files to to test the EcmaScript version against(dist/**/*.js dist/**/*.html)

Options:
  -V, --version          output the version number
  -M,--module            use ES modules
  --allow-hash-bang      if the code starts with #! treat it as a comment
  -E,--exit-code <code>  with Error set process.exit(code)
  -O,--out [filename]    output error message to [filename] file
  -h, --help             display help for command
```

## Local Lib
```sh
npm i @sugarat/es-check
# or
yarn add @sugarat/es-check
# or
pnpm add @sugarat/es-check
```
### Usage
```ts
// ESM
import { checkCode, checkFile, checkHtmlCode } from '@sugarat/es-check'

// CJS
const { checkCode, checkFile, checkHtmlCode } = require('@sugarat/es-check')
```

```ts
checkCode(jsCode, defaultOptions)
checkHtmlCode(htmlCode, defaultOptions)
checkFile(filepath, defaultOptions)
```

example see [__test__/util.test.ts](https://github.com/ATQQ/tools/blob/main/packages/cli/es-check/__test__/util.test.ts)

more utils see [src/util/index.ts](https://github.com/ATQQ/tools/blob/main/packages/cli/es-check/src/util/index.ts)

### Parser Options
```ts
interface ParserOptions {
  /**
   * @default '5'
   * 5|6|...|2015|2022|latest
   */
  ecmaVersion?: EcmaVersion
  /**
   * @default 'script'
   */
  sourceType?: 'module' | 'script'
  /**
   * @default false
   */
  allowHashBang?: boolean
}
```

More detail See [es-check/src/types/index.ts](https://github.com/ATQQ/tools/blob/3a97242163039875ffb8fad60b92102cc9a426d7/packages/cli/es-check/src/types/index.ts#L1-L35)
npm package: @sugarat/ghost
Description: phantom dependency scanning tool - 幽灵依赖扫描工具
Author: ATQQ
Latest version: 0.2.1

# @sugarat/ghost

phantom dependency scanning tool - 幽灵依赖扫描工具

![图片](https://img.cdn.sugarat.top/mdImg/MTY2OTQ1MzI3OTg4Nw==669453279887)

## Quick Started
```sh
npm i -g @sugarat/ghost
```

```sh
# default scan "src/**/**"
ghost scan
```

set scan `dir` or `file`
```sh
ghost scan [target...]

# a directory
ghost scan packages/pkg1/src

# a file
ghost scan src/index.ts

# support glob pattern
ghost scan src/**/** packages/a/**/**
```

![图片](https://img.cdn.sugarat.top/mdImg/MTY2OTQ1NDEyMDUyOA==669454120528)

set `package.json` path

```sh
# default process.cwd()/package.json
ghost scan src -p <paths...>

ghost scan src -p ./package.json otherDir/package.json
```

![图片](https://img.cdn.sugarat.top/mdImg/MTY2OTQ2NjQ2OTk3OA==669466469978)

## Advanced Usage
### CLI
#### Exclude phantom dependency
```sh
ghost scan [pattern...] --exclude-pkg [pkgName...]

ghost scan src/index.tsx --exclude-pkg react react-dom
```

![图片](https://img.cdn.sugarat.top/mdImg/MTY2OTQ1NDc5MjYwNQ==669454792605)
#### Exclude Scan Files
```sh
ghost scan [pattern...] -e [pattern...]
ghost scan [pattern...] --exclude [pattern...]

ghost scan src -e src/index.tsx
```

![图片](https://img.cdn.sugarat.top/mdImg/MTY2OTQ1NTAyNDY0OA==669455024648)

### Local
```sh
npm i @sugarat/ghost
# or
yarn add @sugarat/ghost
# or
pnpm add @sugarat/ghost
```

#### Option
```ts
export interface GhostOptions {
  /**
   * need exclude pkg pattern
   */
  exclude?: ExcludePattern | ExcludePattern[]
  /**
   * include node lib {fs, path, etc}
   * @default false
   */
  includeNodeLib?: boolean
  /**
   * need exclude scan files pattern
   */
  excludeFilePattern?: string | string[]
  /**
   * some alias config like `@components` `@apis` etc
   */
  alias?: Record<string, string>
}
declare type ExcludePattern = string | RegExp;

/**
 * @param paths target file or directory （support glob pattern）
 * @param pkgJsonPath package.json path
 */
declare function findGhost(paths: string | string[], pkgJsonPath: string, options?: GhostOptions): string[];
```

#### ESM
```ts
import { findGhost } from '@sugarat/ghost'
// or
import { findPhantom } from '@sugarat/ghost'
```
#### CJS
```ts
const { findGhost } = require('@sugarat/ghost')
```

#### Usage
```ts
// simple
findGhost('src/**/**','./package.json')

// specific 
const phantomDependency = findGhost(
  path.join(__dirname, 'src'),
  path.join(process.cwd(), 'package.json')
)
```

## More Info
```sh
ghost --help

ghost scan --help
```

More Details See [Source Utils](./src/util/index.ts)
npm package: @sugarat/inlinejs-transform
Description: Transform HTML ES Code🏅
Author: ATQQ
Latest version: 0.0.3

# @sugarat/inlinejs-transform

HTML InlineJS Transform By SWC - 通过SWC直接处理HTML里的内联脚本

simple minify and ES Compile
## Usage
```sh
npm i -g @sugarat/inlinejs-transform
```
or
```sh
# first
npm i @sugarat/inlinejs-transform
# second
# add ijs command into scripts
```
### Transform
compile advanced ES syntax to specified version by SWC
```sh
ijs transform __test__/test.html
```
![图片](https://img.cdn.sugarat.top/mdImg/MTY2NjU0MTE5Mjk3NQ==666541192975)

```sh
ijs transform -e es5 --minify
```
*  `-e, --ecmaVersion [ecmaVersion]`: set transform jsc target version：ES5、ES5、ES2015...ES2022
*  `-m, --minify`: minify transform result
### Minify
```sh
ijs minify __test__/test.html
```
![图片](https://img.cdn.sugarat.top/mdImg/MTY2NjU0MTExNzIyMw==666541117223)

## In PostHTML
```ts
import posthtml from 'posthtml'

import { posthtmlSWCMinify, posthtmlSWCTransform } from '@sugarat/inlinejs-transform'

const htmlCode = `<body>
  <div id="app"></div>
  <script>
    const hello = 'hello'
  </script>
  <script src="hello.js"></script>
  <script>
    const world = 'hello'
  </script>
  <script>
    console.log(hello,world);
  </script>
</body>`

// minify
const minifyResult = posthtml()
    .use(posthtmlSWCMinify())
    .process(htmlCode, { sync: true }).html

// transform
const transformResult = posthtml()
    .use(posthtmlSWCTransform('es5', true))
    .process(htmlCode, { sync: true }).html
```
options detail see [SWC Declaration](https://swc.rs/docs/usage/core#transformfilesync)


## More Info
```sh
ijs --help
ijs transform --help
ijs minify --help
```
npm package: @sugarat/source-map-cli
Description: CLI for source-map tool，simple but powerful
Author: ATQQ
Latest version: 0.1.1

# @sugarat/source-map-cli

CLI for source-map tool，simple but powerful

## Quick Started
```sh
npm i -g @sugarat/source-map-cli
```

```sh
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js:24:17596

smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js -l 24 -c 17596

smt sources https://script.sugarat.top/js/tests/index.9bb0da5c.js
```

![图片](https://img.cdn.sugarat.top/mdImg/MTY2NzY2MTU3MjI4NQ==667661572285)

### Parse Examples
parse js error file
```sh
Usage: smt parse|p [options] <sourceUrl>

parse error form url source

Options:
  -s, --source-map         set url source as sourceMap type
  -l, --line <number>      set line number
  -c, --column <number>    set column number
  -o, --output [string]    set log output dir
  -n, --show-num <number>  set show error source lines (default: "5")
```

parse http source
```sh
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js:24:17596
# or
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js -l 24 -c 17596
```

parse local file
```sh
smt parse /Users/sugar/tests/index.9bb0da5c.js -l 24 -c 17596
```
parse source-map file
```sh
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js.map:24:17596 -s
```

also can out put file

```sh
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js:24:17596 -o ./
```

![图片](https://img.cdn.sugarat.top/mdImg/MTY2NzY1NzIwMDI4OQ==667657200289)

### Sources Examples
generate sources
```sh
Usage: bin sources|s [options] <sourceUrl>

generating source files by source-map

Options:
  -s, --source-map       set url source as sourceMap type
  -o, --output [string]  set files output dir
```

```sh
smt sources https://script.sugarat.top/js/tests/index.9bb0da5c.js
```

![图片](https://img.cdn.sugarat.top/mdImg/MTY2NzY2MDI1Mjg4MA==667660252880)

## AS Lib
```ts
import { getErrorSourceResult } from '@sugarat/source-map-cli'

const result = getErrorSourceResult(url,line,column)
```
more function see [src/util/index.ts](./src/util/index.ts)
npm package: @sugarat/theme
Description: 简约风的 Vitepress 博客主题，sugarat vitepress blog theme
Author: sugar
Latest version: 0.5.17

# @sugarat/theme

简约风的 Vitepress 博客主题，更多细节见 https://theme.sugarat.top

![图片](https://img.cdn.sugarat.top/mdImg/MTY3MzE3MDUxOTMwMw==673170519303~fmt.webp)

## Quick Start
① 创建项目

```bash
# With PNPM:
pnpm create @sugarat/theme

# With NPM:
npm create @sugarat/theme@latest

# With Yarn:
yarn create @sugarat/theme

# With Bun
bun create @sugarat/theme
```

![](https://img.cdn.sugarat.top/mdImg/MTY4OTQyMDE1NTcxMA==689420155710~fmt.webp)

② 安装依赖
```sh
pnpm install
```

③ 开发启动
```sh
pnpm dev
```

④ 构建产物
```sh
pnpm build
```

⑤ 预览构建产物
```sh
pnpm serve
```
## Advanced Usage
详细配置见文档 https://theme.sugarat.top

## Thanks
从以下项目中获得了灵感&经验
* [vuepress-reco/vuepress-theme-reco-1.x](https://github.com/vuepress-reco/vuepress-theme-reco-1.x)
* [@vue/theme](https://github.com/vuejs/theme)
* [vitest](https://vitest.dev/)
* [element-plus](https://github.com/element-plus/element-plus)
* [charles7c.github.io](https://github.com/Charles7c/charles7c.github.io)
* [vitepress-blog-zaun](https://github.com/clark-cui/vitepress-blog-zaun)
* [surmon](https://surmon.me/)
* [vuejs/blog](https://github.com/vuejs/blog/tree/main)
* [列表无限滚动轮播效果](https://code.juejin.cn/pen/7145007064350195748)
npm package: @sugarat/theme-shared
Description: @sugarat/theme-shared
Author: sugar
Latest version: 0.0.7

# @sugarat/theme-shared

Internal utility functions and constants shared across VitePress sources: [@sugarat/theme](https://www.npmjs.com/package/@sugarat/theme), [vitepress-plugin-rss](https://www.npmjs.com/package/vitepress-plugin-rss), [vitepress-plugin-pagefind](https://www.npmjs.com/package/vitepress-plugin-pagefind).
npm package: @sugarch/bc-mod-utility
Description: Various utility for BC mods.
Author: Da'Inihlus
Latest version: 0.2.11

# @sugarch/bc-mod-utility

A collection of utilities designed to simplify and enhance the development of mods for Bondage Club (BC). This package provides reusable tools and helpers to streamline common tasks in modding.

## Features

- **Messager**: A utility for sending custom messages.
- **Globals**: A class for managing global variables and ensuring that certain functions are executed only once.

## Installation

Install the package using your preferred package manager:

```bash
# Using pnpm
pnpm add @sugarch/bc-mod-utility --save-dev

# Using yarn
yarn add @sugarch/bc-mod-utility --dev

# Using npm
npm install @sugarch/bc-mod-utility --save-dev
```

## Usage

### Messager

The `Messager` class is the main utility provided by this package. It allows you to send various types of messages in the chat room.

```typescript
import { Messager } from '@sugarch/bc-mod-utility';

// Create a new Messager instance
const messager = new Messager();

// Send a custom action message
messager.action('This is a custom action message.');

// Send a chat message
messager.chat('Hello, everyone!');

// Send a local action message (only visible locally)
messager.localAction('This is a local action message.');

// Send a whisper to a specific player
messager.whisper(12345, 'This is a private message.');

// Send a beep notification to a specific player
messager.beep(12345, 'You have a new notification!');
```

### `Globals` and `once`

The `Globals` class provides a way to manage global variables and ensure that certain functions are only executed once.

```typescript
import { Globals, once } from '@sugarch/bc-mod-utility';

// Create a new Globals instance, or retrieve an existing one
// the first parameter is the name of the global variable, should be unique.
const globals = Globals.get("MyGlobalName", () => {
    // This function will only be executed once if the global variable 
    // is not already set
    return new MyGlobalObject();
});

// Like the `get` method, but allows for modifying the existing global 
// variable
const globals2 = Globals.getMayOverride("MyGlobalName2", (old) => {
    // if the global variable does not exist, the parameter `old` will 
    // be `undefined`.
    // Here we can create a new instance of `MyGlobalObject2`
    if(!old) return new MyGlobalObject2();

    // Here, the `old` parameter is the existing global variable
    // We can modify it as needed
    old.registerSomeData();
    return old;
});

// The `once` method allows you to register a function that will only 
// be executed once, even if called multiple times or imported 
// multiple times.
// The first parameter is a unique flag name, and the second parameter
// is the function to be executed.
once("MyOnceFlagName", () => {
    // This function will only be executed once, even if called multiple
    // times, or the script imports multiple times
    // It is useful for initializing global variables or performing setup
    // tasks
    console.log('This will only run once!');
});
```
npm package: @sugarcoated/fondant-dictionary
Description: Typed Collection.
Author: Joshua Crowe, Junior Web Developer.
Latest version: 1.0.4

`Dictionary` extends `Collection` to bring typed `Collection`s to JavaScript's weakly typed enviroment. Built to ignore primitives or convert them into `Object`s.

# API Reference

### `new Dictionary(type, [initial])`
Creates a `Dictionary` instance.

* `type` is the non-primitive `constructor` symbol reference to mark. For example, if I created a `class` called `Book`, then I would pass in `Book`, not an instance.
* `initial` is the initialiser to be passed to the encapsulated `Collection`, expected as `Array.<Array.<String, Book>>`.

      class Book {
        constructor (bookName) {
          this.bookName = bookName;
        }
      }

      new Dictionary(Book);
      new Dictionary(Book, [['one', new Book('one')]]);

For more details on how this `constructor` works, see [Collection#constructor](https://github.com/Sugarcoated/Fondant/wiki/Collection#new-collectioniterable).

### `.set(name, value)`
Overrides `Collection`'s method (which can be read about [here](https://github.com/Sugarcoated/Fondant/wiki/Collection#setname-value)).

* `name` is expected as a `String`, identifying the name/key that will identify the particular pair.
* `value` is expected as the `Object` you passed to the `constructor` initially; for the purpose of example this was `Book` in our case.

      const myDictionary = new Dictionary(Book);

      myDictionary.set('one', new Book('one'));


### `.map(condition, [binding])`
Overrides `Collection`'s method (which can be read about [here](https://github.com/Sugarcoated/Fondant/wiki/Collection#mapcondition-binding) to reset item caches.
npm package: @sugarcoated/fondant-key
Description: Key, KVP wrapper.
Author: Joshua Crowe, Junior Web Developer.
Latest version: 1.1.2

Key is a wrapper for the common concept of a Key Value Pair, or a KVP as will be referenced many times in the Fondant library. It is designed around managing every change to a Key and the associated Value, where just accessing the collection of revisions and interactions manually, or handling each one individual by subscribing to the actions. When a change is made to the data, the change is understood -- the old version is cached, and the new version persists.

* View the source for Key at: [src/actionables/Key.js](https://github.com/Sugarcoated/Fondant/blob/master/src/actionables/Key.js).
* View the test file for Key at: [tests/Actionables/testKey.js](https://github.com/Sugarcoated/Fondant/blob/master/test/Actionables/testKey.js).
* View the NPM package at: [@sugarcoated/fondant-key](https://www.npmjs.com/package/@sugarcoated/fondant-key).


# API Reference

## Instance Methods

### `new Key(name, value, [date])`
Creates a new `Key` instance.

* `name` is expected as a `String`, used to identify the Key.
* `value` is expected as an `Object`.
* `date` is an optional parameter, expected as a `Date`, identifying a creation date if the Key is not new.

  new Key('myKey')

Upon construction, you will have access to the following properties:

* `name` is the name of the `Key` ("Key" from "Key Value Pair").
* `value` is the value of the `Key` ("Value" from the "Key Value Pair").

### `.age()`
Evaluate the current age of the Key in seconds.

  myKey.age() // 23

### `.revise()`
Save a brand new revision of the Key. Mostly called within the `Key` methods, but is useful when having to restructure `Key` instances, or when modifying values via the constructor's actual properties -- not via setters, because those call this method anyway.

  myKey.revise()

### `.pair()`
Pairs the `Key` into a conceptually traditional KVP with the format of a single-dimension `Array.<String, Object>`.

  myKey.pair() // ['myKey', {context}]

Returns the derived KVP as an `Array.<String, Object>` that can be easily used with `Map`s, or other `Collection` types.


## Static Methods

* __Nothing to see here.__

## Events

* **Renamed** is called whenever the `Key` instance is given a new name via the `.name` custom setter. Changing the `.keyName` property will not fire this action.
* **Revalued** is called whenever the `Key` instance is given a new value via the `.value` custom setter. Changing the `.keyValue` property will not fired this action.
* **Revised** is called whenever a new revision of the `Key` instance is saved. This occurs whenever a the `Key` is renamed or revalued (however Revised fires afterwards).
* **Cloned** is called whenever the `Key` instance is directly copied via the cloning method.
* **Paired** is called whenever the `Key` instance is directly paired via the pairing method.
npm package: @sugarcoated/fondant-model
Description: Model data without the hassle.
Author: Joshua Crowe, Junior Web Developer
Latest version: 1.0.5

We all model data, but we have nothing to cling on to for managing the data within that model. It is just an object that is returned from an API, or a database. Converting plain objects to types or updating the contents of a typed model without losing reference is strenuous, which is where `Model` comes in. Extending this class will inherit important methods for cloning, assigning, casting and so on.

* View the source at [src/Globals/Model.js](https://github.com/Sugarcoated/Fondant/blob/master/src/Globals/Model.js)
* View the test fie at [test/Globals/testModel.js](https://github.com/Sugarcoated/Fondant/blob/master/test/Globals/testModel.js)
* View the NPM package at [@sugarcoated/fondant-dictionary](https://www.npmjs.com/package/@sugarcoated/fondant-model)

# API Reference
### `new Model()`
Creates a `Model` instance. 


  class Book extends Model {
    constructor (bookName) {
      super ();

      this.bookName = bookName;
    }
  }


### `.difference(comparison)`
Checks the difference against the instance and the `Object` passed.

* `comparison` is expected as an `Object`, representing a set ofm properties to compare against.

  myModel.difference(myObject);


### `.assign(values)`
Assigns values from an `Object` to the properties on an instance.

* `values` is expected as an `Object`, representing a casted or uncasted version of the instance with differing values to assign to the instance.

  myModel.assign(itClone);


### `.prune([item])`
Prunes foreign* properties (not prefixed with the name of the model) from an instance, or a passed `Object`.

* `item` is an optional parameter, expected as an `Object`. When no `item` is passed, pruning applies to the instance called upon.


  itBook.prune();


### `.clone()`
Creates a direct copy of the modeled `Object`. On this base class, this will simply return a plain `Object`. When extending the `Model` class, an override can be written to cast this as seen fit.

      const myClone = myModel.clone();


### `.cast(item, [model])`
Casts a plain `Object` to an instance of `Model`, or passed in. An override can be written for this method to pass in the `Class` itself, and return the `super` method's result anyway.

* `item` is expected as an `Object`, representing an uncasted identical version of the model.
* `model` is an optional parameter, expected as a `Class` that `extends` `Model`. 

  static cast (castItem) {
    return super.cast(castItem, User);
  }
npm package: @sugarcoated/fondant-provider
Description: Providers.
Author: Joshua Crowe, Junior Web Developer.
Latest version: 1.0.3
Deprecated: No longer used.

`Provider` extends `Module` to resemble a factory and produce enviromentally dependant singletons.

# API Reference

### `new Provider(reference, limit)`
Creates a new `Provider` instance. 

* `reference` is expected as a `Provider`, like a self-reference.
* `limit` is expected as a `Number`, representing the instancing roof.

      class myProvider extends Provider {
        constructor (a, b, c) {
          super (myProvider);
        }
      }

Upon construction, you will have access to the following properties:

* `limit` is the instancing roof.
* `factored` is a `Dictionary` of instances.

### `.factor()`
Factors a new instance.

* _Does not accept any arguments._
npm package: @sugarcoated/fondant-queue
Description: Queue asynchronous logic.
Author: Joshua Crowe, Junior Web Developer
Latest version: 1.0.0

Method queues are a common pattern for throttling the execution of methods, so that one will only execute after the other, in a controller manner. ``Queue`` brings that to asynchronous logic such as `Promise` and `async`/`await`. Task the queue with methods you want to throttle in this way, and handle the `Promise` usually expected like you would without.

* View the source for Queue at: [src/actionables/Queue.js](https://github.com/Sugarcoated/Fondant/blob/master/src/Actionables/Queue.js).
* View the test file for Queue at: [tests/Actionables/testQueue.js](https://github.com/Sugarcoated/Fondant/blob/master/test/Actionables/testQueue.js).
* View the NPM package at: [@sugarcoated/fondant-queue](https://www.npmjs.com/package/@sugarcoated/fondant-queue).

# API Reference

## Instance Methods

### `new Queue([max])
Create a new `Queue`.

* `max` is an optional parameter, expected as a `Number`, representing the maximum amount of `AsyncFunction`s or `Function.<Promise>` the `Queue` can hold at any one time.

    new Queue()
    new Queue(20)

Upon construction, you will have access to the following properties:

* `pending` is the current amount of pending `Promise`s.
* `maximum` is the maximum amount of pending `Promise`s allowed.


### `.task(method)`
Add a method to the `Queue`.

* `method`is expected as a `Function` that returns a `Promise`. This can be an `AsyncFunction`.

  myQueue.task(async () => {}).then().catch()
  myQueue.task(() => new Promise(() => {})).then().catch()

### `.pretask(method)`
Add a method to the front of the `Queue`.

* `method` is expected as a `Function` that returns a `Promise`. This can be an `Async Function`.

  myQueue.pretask(async () => {}).then().catch()
  myQueue.pretask(() => new Promise(() => {})).then().catch()

## Instance Events

* `Empty` is fired when the `Queue` resolves the final `Preomise`.