Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kitsu-core

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kitsu-core - npm Package Compare versions

Comparing version 10.0.0-alpha.8 to 10.0.0-alpha.9

dist/camel.js

23

CHANGELOG.md

@@ -6,2 +6,25 @@ # Change Log

# [10.0.0-alpha.9](https://github.com/wopian/kitsu/tree/master/packages/kitsu-core/compare/v10.0.0-alpha.8...v10.0.0-alpha.9) (2021-01-06)
### Chores
* **release:** update documentation ([840d383](https://github.com/wopian/kitsu/tree/master/packages/kitsu-core/commit/840d383))
### Documentation Changes
* update minimum browser support for compiled outputs ([1bd4f77](https://github.com/wopian/kitsu/tree/master/packages/kitsu-core/commit/1bd4f77))
### Refactors
* **kitsu-core:** change camel, kebab and snake to named exports ([1accdbb](https://github.com/wopian/kitsu/tree/master/packages/kitsu-core/commit/1accdbb))
* **kitsu-core:** change output directory to `dist` ([ddcbe09](https://github.com/wopian/kitsu/tree/master/packages/kitsu-core/commit/ddcbe09)), closes [#510](https://github.com/wopian/kitsu/tree/master/packages/kitsu-core/issues/510)
# [10.0.0-alpha.8](https://github.com/wopian/kitsu/tree/master/packages/kitsu-core/compare/v10.0.0-alpha.7...v10.0.0-alpha.8) (2020-12-06)

@@ -8,0 +31,0 @@

352

package.json
{
"version": "10.0.0-alpha.8",
"version": "10.0.0-alpha.9",
"name": "kitsu-core",

@@ -14,6 +14,6 @@ "description": "Simple, lightweight & framework agnostic JSON:API (de)serialsation components",

"license": "MIT",
"main": "lib/index",
"module": "lib/index",
"unpkg": "lib/index.browser.js",
"jsdelivr": "lib/index.browser.js",
"main": "dist/index",
"module": "dist/index",
"unpkg": "dist/index.browser.js",
"jsdelivr": "dist/index.browser.js",
"types": "types/index.d.ts",

@@ -46,3 +46,3 @@ "homepage": "https://github.com/wopian/kitsu/tree/master/packages/kitsu-core#readme",

{
"path": "./lib/index.js",
"path": "./dist/index.js",
"limit": "2 kb",

@@ -52,3 +52,3 @@ "brotli": true

{
"path": "./lib/index.mjs",
"path": "./dist/index.mjs",
"limit": "2 kb",

@@ -58,3 +58,3 @@ "brotli": true

{
"path": "./lib/index.browser.js",
"path": "./dist/index.browser.js",
"limit": "2 kb",

@@ -64,3 +64,3 @@ "brotli": true

],
"gitHead": "5c9778d191d17d7c9790cfc6d0f4e983b4742a53",
"gitHead": "320d1012c76ac28dddd78382638c9ecdd06f77b3",
"devDependencies": {

@@ -72,138 +72,270 @@ "@size-limit/preset-small-lib": "~4.9.0"

".": {
"import": "./lib/index.mjs",
"require": "./lib/index.js"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./lib/index": {
"import": "./lib/index.mjs",
"require": "./lib/index.js"
"./index": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./lib/index.js": {
"import": "./lib/index.mjs",
"require": "./lib/index.js"
"./index.js": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./lib/index.mjs": {
"import": "./lib/index.mjs",
"require": "./lib/index.js"
"./index.mjs": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./lib/camel": {
"import": "./lib/camel.mjs",
"require": "./lib/camel.js"
"./camel": {
"import": "./dist/camel.mjs",
"require": "./dist/camel.js"
},
"./lib/camel.js": {
"import": "./lib/camel.mjs",
"require": "./lib/camel.js"
"./camel.js": {
"import": "./dist/camel.mjs",
"require": "./dist/camel.js"
},
"./lib/camel.mjs": {
"import": "./lib/camel.mjs",
"require": "./lib/camel.js"
"./camel.mjs": {
"import": "./dist/camel.mjs",
"require": "./dist/camel.js"
},
"./lib/deattribute": {
"import": "./lib/deattribute.mjs",
"require": "./lib/deattribute.js"
"./deattribute": {
"import": "./dist/deattribute.mjs",
"require": "./dist/deattribute.js"
},
"./lib/deattribute.js": {
"import": "./lib/deattribute.mjs",
"require": "./lib/deattribute.js"
"./deattribute.js": {
"import": "./dist/deattribute.mjs",
"require": "./dist/deattribute.js"
},
"./lib/deattribute.mjs": {
"import": "./lib/deattribute.mjs",
"require": "./lib/deattribute.js"
"./deattribute.mjs": {
"import": "./dist/deattribute.mjs",
"require": "./dist/deattribute.js"
},
"./lib/deserialise": {
"import": "./lib/deserialise.mjs",
"require": "./lib/deserialise.js"
"./deserialise": {
"import": "./dist/deserialise.mjs",
"require": "./dist/deserialise.js"
},
"./lib/deserialise.js": {
"import": "./lib/deserialise.mjs",
"require": "./lib/deserialise.js"
"./deserialise.js": {
"import": "./dist/deserialise.mjs",
"require": "./dist/deserialise.js"
},
"./lib/deserialise.mjs": {
"import": "./lib/deserialise.mjs",
"require": "./lib/deserialise.js"
"./deserialise.mjs": {
"import": "./dist/deserialise.mjs",
"require": "./dist/deserialise.js"
},
"./lib/error": {
"import": "./lib/error.mjs",
"require": "./lib/error.js"
"./error": {
"import": "./dist/error.mjs",
"require": "./dist/error.js"
},
"./lib/error.js": {
"import": "./lib/error.mjs",
"require": "./lib/error.js"
"./error.js": {
"import": "./dist/error.mjs",
"require": "./dist/error.js"
},
"./lib/error.mjs": {
"import": "./lib/error.mjs",
"require": "./lib/error.js"
"./error.mjs": {
"import": "./dist/error.mjs",
"require": "./dist/error.js"
},
"./lib/filterIncludes": {
"import": "./lib/filterIncludes.mjs",
"require": "./lib/filterIncludes.js"
"./filterIncludes": {
"import": "./dist/filterIncludes.mjs",
"require": "./dist/filterIncludes.js"
},
"./lib/filterIncludes.js": {
"import": "./lib/filterIncludes.mjs",
"require": "./lib/filterIncludes.js"
"./filterIncludes.js": {
"import": "./dist/filterIncludes.mjs",
"require": "./dist/filterIncludes.js"
},
"./lib/filterIncludes.mjs": {
"import": "./lib/filterIncludes.mjs",
"require": "./lib/filterIncludes.js"
"./filterIncludes.mjs": {
"import": "./dist/filterIncludes.mjs",
"require": "./dist/filterIncludes.js"
},
"./lib/kebab": {
"import": "./lib/kebab.mjs",
"require": "./lib/kebab.js"
"./kebab": {
"import": "./dist/kebab.mjs",
"require": "./dist/kebab.js"
},
"./lib/kebab.js": {
"import": "./lib/kebab.mjs",
"require": "./lib/kebab.js"
"./kebab.js": {
"import": "./dist/kebab.mjs",
"require": "./dist/kebab.js"
},
"./lib/kebab.mjs": {
"import": "./lib/kebab.mjs",
"require": "./lib/kebab.js"
"./kebab.mjs": {
"import": "./dist/kebab.mjs",
"require": "./dist/kebab.js"
},
"./lib/linkRelationships": {
"import": "./lib/linkRelationships.mjs",
"require": "./lib/linkRelationships.js"
"./linkRelationships": {
"import": "./dist/linkRelationships.mjs",
"require": "./dist/linkRelationships.js"
},
"./lib/linkRelationships.js": {
"import": "./lib/linkRelationships.mjs",
"require": "./lib/linkRelationships.js"
"./linkRelationships.js": {
"import": "./dist/linkRelationships.mjs",
"require": "./dist/linkRelationships.js"
},
"./lib/linkRelationships.mjs": {
"import": "./lib/linkRelationships.mjs",
"require": "./lib/linkRelationships.js"
"./linkRelationships.mjs": {
"import": "./dist/linkRelationships.mjs",
"require": "./dist/linkRelationships.js"
},
"./lib/query": {
"import": "./lib/query.mjs",
"require": "./lib/query.js"
"./query": {
"import": "./dist/query.mjs",
"require": "./dist/query.js"
},
"./lib/query.js": {
"import": "./lib/query.mjs",
"require": "./lib/query.js"
"./query.js": {
"import": "./dist/query.mjs",
"require": "./dist/query.js"
},
"./lib/query.mjs": {
"import": "./lib/query.mjs",
"require": "./lib/query.js"
"./query.mjs": {
"import": "./dist/query.mjs",
"require": "./dist/query.js"
},
"./lib/serialise": {
"import": "./lib/serialise.mjs",
"require": "./lib/serialise.js"
"./serialise": {
"import": "./dist/serialise.mjs",
"require": "./dist/serialise.js"
},
"./lib/serialise.js": {
"import": "./lib/serialise.mjs",
"require": "./lib/serialise.js"
"./serialise.js": {
"import": "./dist/serialise.mjs",
"require": "./dist/serialise.js"
},
"./lib/serialise.mjs": {
"import": "./lib/serialise.mjs",
"require": "./lib/serialise.js"
"./serialise.mjs": {
"import": "./dist/serialise.mjs",
"require": "./dist/serialise.js"
},
"./lib/snake": {
"import": "./lib/snake.mjs",
"require": "./lib/snake.js"
"./snake": {
"import": "./dist/snake.mjs",
"require": "./dist/snake.js"
},
"./lib/snake.js": {
"import": "./lib/snake.mjs",
"require": "./lib/snake.js"
"./snake.js": {
"import": "./dist/snake.mjs",
"require": "./dist/snake.js"
},
"./lib/snake.mjs": {
"import": "./lib/snake.mjs",
"require": "./lib/snake.js"
"./snake.mjs": {
"import": "./dist/snake.mjs",
"require": "./dist/snake.js"
},
"./dist/index": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./dist/index.js": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./dist/index.mjs": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./dist/camel": {
"import": "./dist/camel.mjs",
"require": "./dist/camel.js"
},
"./dist/camel.js": {
"import": "./dist/camel.mjs",
"require": "./dist/camel.js"
},
"./dist/camel.mjs": {
"import": "./dist/camel.mjs",
"require": "./dist/camel.js"
},
"./dist/deattribute": {
"import": "./dist/deattribute.mjs",
"require": "./dist/deattribute.js"
},
"./dist/deattribute.js": {
"import": "./dist/deattribute.mjs",
"require": "./dist/deattribute.js"
},
"./dist/deattribute.mjs": {
"import": "./dist/deattribute.mjs",
"require": "./dist/deattribute.js"
},
"./dist/deserialise": {
"import": "./dist/deserialise.mjs",
"require": "./dist/deserialise.js"
},
"./dist/deserialise.js": {
"import": "./dist/deserialise.mjs",
"require": "./dist/deserialise.js"
},
"./dist/deserialise.mjs": {
"import": "./dist/deserialise.mjs",
"require": "./dist/deserialise.js"
},
"./dist/error": {
"import": "./dist/error.mjs",
"require": "./dist/error.js"
},
"./dist/error.js": {
"import": "./dist/error.mjs",
"require": "./dist/error.js"
},
"./dist/error.mjs": {
"import": "./dist/error.mjs",
"require": "./dist/error.js"
},
"./dist/filterIncludes": {
"import": "./dist/filterIncludes.mjs",
"require": "./dist/filterIncludes.js"
},
"./dist/filterIncludes.js": {
"import": "./dist/filterIncludes.mjs",
"require": "./dist/filterIncludes.js"
},
"./dist/filterIncludes.mjs": {
"import": "./dist/filterIncludes.mjs",
"require": "./dist/filterIncludes.js"
},
"./dist/kebab": {
"import": "./dist/kebab.mjs",
"require": "./dist/kebab.js"
},
"./dist/kebab.js": {
"import": "./dist/kebab.mjs",
"require": "./dist/kebab.js"
},
"./dist/kebab.mjs": {
"import": "./dist/kebab.mjs",
"require": "./dist/kebab.js"
},
"./dist/linkRelationships": {
"import": "./dist/linkRelationships.mjs",
"require": "./dist/linkRelationships.js"
},
"./dist/linkRelationships.js": {
"import": "./dist/linkRelationships.mjs",
"require": "./dist/linkRelationships.js"
},
"./dist/linkRelationships.mjs": {
"import": "./dist/linkRelationships.mjs",
"require": "./dist/linkRelationships.js"
},
"./dist/query": {
"import": "./dist/query.mjs",
"require": "./dist/query.js"
},
"./dist/query.js": {
"import": "./dist/query.mjs",
"require": "./dist/query.js"
},
"./dist/query.mjs": {
"import": "./dist/query.mjs",
"require": "./dist/query.js"
},
"./dist/serialise": {
"import": "./dist/serialise.mjs",
"require": "./dist/serialise.js"
},
"./dist/serialise.js": {
"import": "./dist/serialise.mjs",
"require": "./dist/serialise.js"
},
"./dist/serialise.mjs": {
"import": "./dist/serialise.mjs",
"require": "./dist/serialise.js"
},
"./dist/snake": {
"import": "./dist/snake.mjs",
"require": "./dist/snake.js"
},
"./dist/snake.js": {
"import": "./dist/snake.mjs",
"require": "./dist/snake.js"
},
"./dist/snake.mjs": {
"import": "./dist/snake.mjs",
"require": "./dist/snake.js"
}
}
}

@@ -41,3 +41,3 @@ <h1 align=center>Kitsu Core</h1>

| -----------: | :----------------: | :-------: | :--: | :----: | :-----: | :----: | :--: |
| `kitsu-core` | ≤ 1.5 kb | ≤ 1.3 KB | 12+ | 69+ | 68+ | 12+ | 18+ |
| `kitsu-core` | ≤ 1.5 kb | ≤ 1.4 KB | 12+ | 72+ | 78+ | 12.1+ | 86+ |

@@ -95,39 +95,67 @@ \* Minified with brotli

- [deattribute](#deattribute)
- [camel](#camel)
- [Parameters](#parameters)
- [Examples](#examples)
- [deserialise](#deserialise)
- [deattribute](#deattribute)
- [Parameters](#parameters-1)
- [Examples](#examples-1)
- [error](#error)
- [deserialise](#deserialise)
- [Parameters](#parameters-2)
- [Examples](#examples-2)
- [filterIncludes](#filterincludes)
- [error](#error)
- [Parameters](#parameters-3)
- [Examples](#examples-3)
- [linkRelationships](#linkrelationships)
- [filterIncludes](#filterincludes)
- [Parameters](#parameters-4)
- [Examples](#examples-4)
- [query](#query)
- [kebab](#kebab)
- [Parameters](#parameters-5)
- [Examples](#examples-5)
- [serialise](#serialise)
- [linkRelationships](#linkrelationships)
- [Parameters](#parameters-6)
- [Examples](#examples-6)
- [splitModel](#splitmodel)
- [query](#query)
- [Parameters](#parameters-7)
- [Examples](#examples-7)
- [camel](#camel)
- [serialise](#serialise)
- [Parameters](#parameters-8)
- [Examples](#examples-8)
- [kebab](#kebab)
- [snake](#snake)
- [Parameters](#parameters-9)
- [Examples](#examples-9)
- [snake](#snake)
- [splitModel](#splitmodel)
- [Parameters](#parameters-10)
- [Examples](#examples-10)
### camel
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/camel/index.js#L14-L14 "Source code on GitHub")
Converts kebab-case and snake_case into camelCase
#### Parameters
- `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** String to convert
#### Examples
Convert kebab-case
```javascript
camel('hello-world') // 'helloWorld'
```
Convert snake_case
```javascript
camel('hello_world') // 'helloWorld'
```
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase formatted string
### deattribute
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/deattribute/index.js#L29-L51 "Source code on GitHub")
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/deattribute/index.js#L29-L51 "Source code on GitHub")

@@ -176,3 +204,3 @@ Hoists attributes to be top-level

[packages/kitsu-core/src/deserialise/index.js:57-72](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/deserialise/index.js#L57-L72 "Source code on GitHub")
[packages/kitsu-core/src/deserialise/index.js:57-72](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/deserialise/index.js#L57-L72 "Source code on GitHub")

@@ -229,3 +257,3 @@ Deserialises a JSON-API response

[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/error/index.js#L27-L33 "Source code on GitHub")
[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/error/index.js#L27-L33 "Source code on GitHub")

@@ -267,3 +295,3 @@ Uniform error handling for Axios, JSON:API and internal package errors. Mutated Error object is rethrown to the caller.

[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/filterIncludes/index.js#L33-L46 "Source code on GitHub")
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/filterIncludes/index.js#L33-L46 "Source code on GitHub")

@@ -305,5 +333,23 @@ Filters includes for the specific relationship requested

### kebab
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/kebab/index.js#L11-L11 "Source code on GitHub")
Converts camelCase into kebab-case
#### Parameters
- `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase string
#### Examples
```javascript
kebab('helloWorld') // 'hello-world'
```
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** kebab-case formatted string
### linkRelationships
[packages/kitsu-core/src/linkRelationships/index.js:97-117](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/linkRelationships/index.js#L97-L117 "Source code on GitHub")
[packages/kitsu-core/src/linkRelationships/index.js:97-117](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/linkRelationships/index.js#L97-L117 "Source code on GitHub")

@@ -346,3 +392,3 @@ Links relationships to included data

[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/query/index.js#L33-L44 "Source code on GitHub")
[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/query/index.js#L33-L44 "Source code on GitHub")

@@ -375,3 +421,3 @@ Constructs a URL query string for JSON:API parameters

[packages/kitsu-core/src/serialise/index.js:210-221](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/serialise/index.js#L210-L221 "Source code on GitHub")
[packages/kitsu-core/src/serialise/index.js:210-221](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/serialise/index.js#L210-L221 "Source code on GitHub")

@@ -420,5 +466,23 @@ Serialises an object into a JSON-API structure

### snake
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/snake/index.js#L11-L11 "Source code on GitHub")
Converts camelCase into snake_case
#### Parameters
- `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase string
#### Examples
```javascript
snake('helloWorld') // 'hello_world'
```
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** snake_case formatted string
### splitModel
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/splitModel/index.js#L29-L39 "Source code on GitHub")
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/b34d85434473d745bfc9ce5784704ddc3855dd3c/packages/kitsu-core/src/splitModel/index.js#L29-L39 "Source code on GitHub")

@@ -463,65 +527,1 @@ Split model name from the model's resource URL

Returns **\[[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)]** } Array containing the model name and the resource URL with pluralisation applied
### camel
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/camel/index.js#L14-L14 "Source code on GitHub")
Converts kebab-case and snake_case into camelCase
#### Parameters
- `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** String to convert
#### Examples
Convert kebab-case
```javascript
camel('hello-world') // 'helloWorld'
```
Convert snake_case
```javascript
camel('hello_world') // 'helloWorld'
```
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase formatted string
### kebab
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/kebab/index.js#L11-L11 "Source code on GitHub")
Converts camelCase into kebab-case
#### Parameters
- `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase string
#### Examples
```javascript
kebab('helloWorld') // 'hello-world'
```
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** kebab-case formatted string
### snake
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/e1b988cb961081f12309f5e881d63d123be7f4cf/packages/kitsu-core/src/snake/index.js#L11-L11 "Source code on GitHub")
Converts camelCase into snake_case
#### Parameters
- `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase string
#### Examples
```javascript
snake('helloWorld') // 'hello_world'
```
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** snake_case formatted string

@@ -1,2 +0,1 @@

declare function _default(input: string): string;
export default _default;
export function camel(input: string): string;

@@ -0,1 +1,2 @@

export * from "./camel";
export * from "./deattribute";

@@ -5,8 +6,7 @@ export * from "./deserialise";

export * from "./filterIncludes";
export * from "./kebab";
export * from "./linkRelationships";
export * from "./query";
export * from "./serialise";
export * from "./snake";
export * from "./splitModel";
export { default as camel } from "./camel";
export { default as kebab } from "./kebab";
export { default as snake } from "./snake";

@@ -1,2 +0,1 @@

declare function _default(input: string): string;
export default _default;
export function kebab(input: string): string;

@@ -1,2 +0,1 @@

declare function _default(input: string): string;
export default _default;
export function snake(input: string): string;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc