mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-09-16 12:39:05 +00:00
update
This commit is contained in:
21
node_modules/slugify/LICENSE
generated
vendored
Normal file
21
node_modules/slugify/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Simeon Velichkov <simeonvelichkov@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
80
node_modules/slugify/README.md
generated
vendored
Normal file
80
node_modules/slugify/README.md
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
# slugify
|
||||
|
||||
[![npm-version]][npm] [![travis-ci]][travis] [![coveralls-status]][coveralls]
|
||||
|
||||
```js
|
||||
var slugify = require('slugify')
|
||||
|
||||
slugify('some string') // some-string
|
||||
|
||||
// if you prefer something other than '-' as separator
|
||||
slugify('some string', '_') // some_string
|
||||
```
|
||||
|
||||
- Vanilla ES5 JavaScript
|
||||
- No dependencies
|
||||
- Coerces foreign symbols to their English equivalent (check out the [charMap][charmap] for more details)
|
||||
- Works in the browser (window.slugify) and AMD/CommonJS-flavored module loaders
|
||||
|
||||
## Options
|
||||
|
||||
```js
|
||||
slugify('some string', {
|
||||
replacement: '-', // replace spaces with replacement
|
||||
remove: null, // regex to remove characters
|
||||
lower: true, // result in lower case
|
||||
})
|
||||
```
|
||||
|
||||
For example, to remove `*+~.()'"!:@` from the result slug, you can use `slugify('..', {remove: /[*+~.()'"!:@]/g})`.
|
||||
|
||||
## Extend
|
||||
|
||||
Out of the box `slugify` comes with support for a handful of Unicode symbols. For example the `☢` (radioactive) symbol is not defined in the [`charMap`][charmap] and therefore it will be stripped by default:
|
||||
|
||||
```js
|
||||
slugify('unicode ♥ is ☢') // unicode-love-is
|
||||
```
|
||||
|
||||
However you can extend the supported symbols, or override the existing ones with your own:
|
||||
|
||||
```js
|
||||
slugify.extend({'☢': 'radioactive'})
|
||||
slugify('unicode ♥ is ☢') // unicode-love-is-radioactive
|
||||
```
|
||||
|
||||
Keep in mind that the `extend` method extends/overrides the default `charMap` for the entire process. In case you need a fresh instance of the slugify's `charMap` object you have to clean up the module cache first:
|
||||
|
||||
```js
|
||||
delete require.cache[require.resolve('slugify')]
|
||||
var slugify = require('slugify')
|
||||
```
|
||||
|
||||
## Contribute
|
||||
|
||||
1. Add chars to `charmap.json`
|
||||
2. Run tests `npm test`
|
||||
3. The tests will build the charmap in `index.js` and will sort the `charmap.json`
|
||||
4. Commit **all** modified files
|
||||
|
||||
---
|
||||
|
||||
> This module was originally a vanilla javascript port of [node-slug][node-slug].<br>
|
||||
> Note that the original [slug][slug] module has been ported to vanilla javascript too.<br>
|
||||
> One major difference between the two modules is that `slugify` does not depend on the external [unicode][unicode] module.
|
||||
|
||||
|
||||
[npm-version]: https://img.shields.io/npm/v/slugify.svg?style=flat-square (NPM Package Version)
|
||||
[travis-ci]: https://img.shields.io/travis/simov/slugify/master.svg?style=flat-square (Build Status - Travis CI)
|
||||
[coveralls-status]: https://img.shields.io/coveralls/simov/slugify.svg?style=flat-square (Test Coverage - Coveralls)
|
||||
|
||||
[npm]: https://www.npmjs.com/package/slugify
|
||||
[travis]: https://travis-ci.org/simov/slugify
|
||||
[coveralls]: https://coveralls.io/r/simov/slugify?branch=master
|
||||
|
||||
[node-slug]: https://github.com/dodo/node-slug
|
||||
[slug]: https://www.npmjs.com/package/slug
|
||||
[unicode]: https://www.npmjs.com/package/unicode
|
||||
[index]: https://github.com/simov/slugify/blob/master/index.js
|
||||
[charmap]: https://github.com/simov/slugify/blob/master/config/charmap.json
|
75
node_modules/slugify/package.json
generated
vendored
Normal file
75
node_modules/slugify/package.json
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"slugify@1.3.6",
|
||||
"/Users/tatiana/selfdefined"
|
||||
]
|
||||
],
|
||||
"_from": "slugify@1.3.6",
|
||||
"_id": "slugify@1.3.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-wA9XS475ZmGNlEnYYLPReSfuz/c3VQsEMoU43mi6OnKMCdbnFXd4/Yg7J0lBv8jkPolacMpOrWEaoYxuE1+hoQ==",
|
||||
"_location": "/slugify",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "slugify@1.3.6",
|
||||
"name": "slugify",
|
||||
"escapedName": "slugify",
|
||||
"rawSpec": "1.3.6",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.3.6"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@11ty/eleventy"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.6.tgz",
|
||||
"_spec": "1.3.6",
|
||||
"_where": "/Users/tatiana/selfdefined",
|
||||
"author": {
|
||||
"name": "Simeon Velichkov",
|
||||
"email": "simeonvelichkov@gmail.com",
|
||||
"url": "https://simov.github.io"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/simov/slugify/issues"
|
||||
},
|
||||
"description": "Slugifies a String",
|
||||
"devDependencies": {
|
||||
"coveralls": "^3.0.1",
|
||||
"istanbul": "^0.4.5",
|
||||
"mocha": "^5.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"slugify.d.ts",
|
||||
"slugify.js"
|
||||
],
|
||||
"homepage": "https://github.com/simov/slugify",
|
||||
"keywords": [
|
||||
"slugify",
|
||||
"slug",
|
||||
"url",
|
||||
"urlify"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./slugify.js",
|
||||
"name": "slugify",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/simov/slugify.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node bin/build",
|
||||
"test": "npm run build && npm run test:ci",
|
||||
"test:ci": "mocha test/",
|
||||
"test:cov": "istanbul cover _mocha"
|
||||
},
|
||||
"types": "slugify.d.ts",
|
||||
"version": "1.3.6"
|
||||
}
|
21
node_modules/slugify/slugify.d.ts
generated
vendored
Normal file
21
node_modules/slugify/slugify.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
declare module slugify {
|
||||
type ExtendArgs = {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export function extend (args: ExtendArgs): void;
|
||||
}
|
||||
|
||||
declare function slugify(
|
||||
string: string,
|
||||
options?:
|
||||
| {
|
||||
replacement?: string;
|
||||
remove?: RegExp;
|
||||
lower?: boolean;
|
||||
}
|
||||
| string,
|
||||
|
||||
): string;
|
||||
|
||||
export default slugify;
|
50
node_modules/slugify/slugify.js
generated
vendored
Normal file
50
node_modules/slugify/slugify.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user