Skip to content

Commit

Permalink
Merge pull request #368 from Inist-CNRS/drop-duplicate-statements
Browse files Browse the repository at this point in the history
feat: 🎸 TXTInflection & TXTSentences move to @ezs/strings
  • Loading branch information
touv authored Nov 5, 2024
2 parents 54732ae + 0bdcbf8 commit f72bca0
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 593 deletions.
69 changes: 0 additions & 69 deletions docs/plugin-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ npm install @ezs/basics
- [TARDump](#tardump)
- [TARExtract](#tarextract)
- [TXTConcat](#txtconcat)
- [TXTInflection](#txtinflection)
- [TXTObject](#txtobject)
- [TXTParse](#txtparse)
- [TXTSentences](#txtsentences)
- [TXTZip](#txtzip)
- [URLConnect](#urlconnect)
- [URLFetch](#urlfetch)
Expand Down Expand Up @@ -650,46 +648,6 @@ Output:

Returns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

### TXTInflection

Take a `String` and inflect it with or more transformers from this list
pluralize, singularize, camelize, underscore, humanize, capitalize,
dasherize, titleize, demodulize, tableize, classify, foreign_key, ordinalize

Input:

```json
{ "id": 1, "value": "all job" }
```

Script:

```ini
[TXTInflection]
transform = pluralize
transform = capitalize
transform = dasherize
```

Output:

```json
{ "id": 1, "value": "All-jobs" }
```

#### Parameters

- `path` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path of the field to segment (optional, default `"value"`)
- `transform` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** name of a transformer

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

**Meta**

- **deprecated**: see <https://inist-cnrs.github.io/ezs/#/plugin-strings?id=inflection>
see <https://www.npmjs.com/package/inflection>


### TXTObject

Take an array of values and generate an array containing objects with the
Expand Down Expand Up @@ -735,33 +693,6 @@ Output:

Returns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

### TXTSentences

Take a `String` and split it into an array of sentences.

Input:

```json
{ "id": 1, "value": "First sentence? Second sentence. My name is Bond, J. Bond." }
```

Output:

```json
{ "id": 1, "value": ["First sentence?", "Second sentence.", "My name is Bond, J. Bond."] }
```

#### Parameters

- `path` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path of the field to segment (optional, default `"value"`)

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

**Meta**

- **deprecated**: see <https://inist-cnrs.github.io/ezs/#/plugin-strings?id=sentences>


### TXTZip

Take a `String` and zip it.
Expand Down
69 changes: 0 additions & 69 deletions packages/basics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ npm install @ezs/basics
- [TARDump](#tardump)
- [TARExtract](#tarextract)
- [TXTConcat](#txtconcat)
- [TXTInflection](#txtinflection)
- [TXTObject](#txtobject)
- [TXTParse](#txtparse)
- [TXTSentences](#txtsentences)
- [TXTZip](#txtzip)
- [URLConnect](#urlconnect)
- [URLFetch](#urlfetch)
Expand Down Expand Up @@ -650,46 +648,6 @@ Output:

Returns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

### TXTInflection

Take a `String` and inflect it with or more transformers from this list
pluralize, singularize, camelize, underscore, humanize, capitalize,
dasherize, titleize, demodulize, tableize, classify, foreign_key, ordinalize

Input:

```json
{ "id": 1, "value": "all job" }
```

Script:

```ini
[TXTInflection]
transform = pluralize
transform = capitalize
transform = dasherize
```

Output:

```json
{ "id": 1, "value": "All-jobs" }
```

#### Parameters

- `path` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path of the field to segment (optional, default `"value"`)
- `transform` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** name of a transformer

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

**Meta**

- **deprecated**: see <https://inist-cnrs.github.io/ezs/#/plugin-strings?id=inflection>
see <https://www.npmjs.com/package/inflection>


### TXTObject

Take an array of values and generate an array containing objects with the
Expand Down Expand Up @@ -735,33 +693,6 @@ Output:

Returns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

### TXTSentences

Take a `String` and split it into an array of sentences.

Input:

```json
{ "id": 1, "value": "First sentence? Second sentence. My name is Bond, J. Bond." }
```

Output:

```json
{ "id": 1, "value": ["First sentence?", "Second sentence.", "My name is Bond, J. Bond."] }
```

#### Parameters

- `path` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path of the field to segment (optional, default `"value"`)

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**

**Meta**

- **deprecated**: see <https://inist-cnrs.github.io/ezs/#/plugin-strings?id=sentences>


### TXTZip

Take a `String` and zip it.
Expand Down
1 change: 0 additions & 1 deletion packages/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"from": "0.1.7",
"get-stream": "6.0.1",
"higher-path": "1.0.0",
"inflection": "2.0.1",
"lodash": "4.17.21",
"make-dir": "4.0.0",
"micromatch": "4.0.8",
Expand Down
4 changes: 0 additions & 4 deletions packages/basics/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import BIBParse from './bib-parse';
import TXTConcat from './txt-concat';
import TXTObject from './txt-object';
import TXTParse from './txt-parse';
import TXTSentences from './txt-sentences';
import TXTInflection from './txt-inflection';
import XMLParse from './xml-parse';
import XMLString from './xml-string';
import XMLConvert from './xml-convert';
Expand Down Expand Up @@ -43,8 +41,6 @@ const funcs = {
TXTParse,
TXTObject,
TXTConcat,
TXTSentences,
TXTInflection,
XMLParse,
XMLString,
XMLConvert,
Expand Down
57 changes: 0 additions & 57 deletions packages/basics/src/txt-inflection.js

This file was deleted.

98 changes: 0 additions & 98 deletions packages/basics/src/txt-sentences.js

This file was deleted.

Loading

0 comments on commit f72bca0

Please sign in to comment.