mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 04:10:04 +02:00
use minify
This commit is contained in:
21
node_modules/no-case/LICENSE
generated
vendored
Normal file
21
node_modules/no-case/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.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.
|
50
node_modules/no-case/README.md
generated
vendored
Normal file
50
node_modules/no-case/README.md
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# No Case
|
||||
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![NPM downloads][downloads-image]][downloads-url]
|
||||
[![Build status][travis-image]][travis-url]
|
||||
[![Test coverage][coveralls-image]][coveralls-url]
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
Transform a string to lower space cased. Optional locale and replacement character supported.
|
||||
|
||||
Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a `toString` property, numbers and booleans. Empty values (`null` and `undefined`) will result in an empty string.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install no-case --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var noCase = require('no-case')
|
||||
|
||||
noCase(null) //=> ""
|
||||
noCase('string') //=> "string"
|
||||
noCase('dot.case') //=> "dot case"
|
||||
noCase('camelCase') //=> "camel case"
|
||||
noCase('Beyoncé Knowles') //=> "beyoncé knowles"
|
||||
|
||||
noCase('A STRING', 'tr') //=> "a strıng"
|
||||
|
||||
noCase('HELLO WORLD!', null, '_') //=> "hello_world"
|
||||
```
|
||||
|
||||
## Typings
|
||||
|
||||
Includes a [TypeScript definition](no-case.d.ts).
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/no-case.svg?style=flat
|
||||
[npm-url]: https://npmjs.org/package/no-case
|
||||
[downloads-image]: https://img.shields.io/npm/dm/no-case.svg?style=flat
|
||||
[downloads-url]: https://npmjs.org/package/no-case
|
||||
[travis-image]: https://img.shields.io/travis/blakeembrey/no-case.svg?style=flat
|
||||
[travis-url]: https://travis-ci.org/blakeembrey/no-case
|
||||
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/no-case.svg?style=flat
|
||||
[coveralls-url]: https://coveralls.io/r/blakeembrey/no-case?branch=master
|
3
node_modules/no-case/no-case.d.ts
generated
vendored
Normal file
3
node_modules/no-case/no-case.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare function noCase (value: string, locale?: string, replacement?: string): string;
|
||||
|
||||
export = noCase;
|
40
node_modules/no-case/no-case.js
generated
vendored
Normal file
40
node_modules/no-case/no-case.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
var lowerCase = require('lower-case')
|
||||
|
||||
var NON_WORD_REGEXP = require('./vendor/non-word-regexp')
|
||||
var CAMEL_CASE_REGEXP = require('./vendor/camel-case-regexp')
|
||||
var CAMEL_CASE_UPPER_REGEXP = require('./vendor/camel-case-upper-regexp')
|
||||
|
||||
/**
|
||||
* Sentence case a string.
|
||||
*
|
||||
* @param {string} str
|
||||
* @param {string} locale
|
||||
* @param {string} replacement
|
||||
* @return {string}
|
||||
*/
|
||||
module.exports = function (str, locale, replacement) {
|
||||
if (str == null) {
|
||||
return ''
|
||||
}
|
||||
|
||||
replacement = typeof replacement !== 'string' ? ' ' : replacement
|
||||
|
||||
function replace (match, index, value) {
|
||||
if (index === 0 || index === (value.length - match.length)) {
|
||||
return ''
|
||||
}
|
||||
|
||||
return replacement
|
||||
}
|
||||
|
||||
str = String(str)
|
||||
// Support camel case ("camelCase" -> "camel Case").
|
||||
.replace(CAMEL_CASE_REGEXP, '$1 $2')
|
||||
// Support odd camel case ("CAMELCase" -> "CAMEL Case").
|
||||
.replace(CAMEL_CASE_UPPER_REGEXP, '$1 $2')
|
||||
// Remove all non-word characters and replace with a single space.
|
||||
.replace(NON_WORD_REGEXP, replace)
|
||||
|
||||
// Lower case the entire string.
|
||||
return lowerCase(str, locale)
|
||||
}
|
82
node_modules/no-case/package.json
generated
vendored
Normal file
82
node_modules/no-case/package.json
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"_from": "no-case@^2.2.0",
|
||||
"_id": "no-case@2.3.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==",
|
||||
"_location": "/no-case",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "no-case@^2.2.0",
|
||||
"name": "no-case",
|
||||
"escapedName": "no-case",
|
||||
"rawSpec": "^2.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/camel-case",
|
||||
"/param-case"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
|
||||
"_shasum": "60b813396be39b3f1288a4c1ed5d1e7d28b464ac",
|
||||
"_spec": "no-case@^2.2.0",
|
||||
"_where": "F:\\projects\\p\\minifyfromhtml\\node_modules\\camel-case",
|
||||
"author": {
|
||||
"name": "Blake Embrey",
|
||||
"email": "hello@blakeembrey.com",
|
||||
"url": "http://blakeembrey.me"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/blakeembrey/no-case/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"lower-case": "^1.1.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Remove case from a string",
|
||||
"devDependencies": {
|
||||
"chai": "^4.0.2",
|
||||
"istanbul": "^0.4.3",
|
||||
"jsesc": "^2.2.0",
|
||||
"mocha": "^3.0.0",
|
||||
"standard": "^10.0.2",
|
||||
"xregexp": "^3.1.1"
|
||||
},
|
||||
"files": [
|
||||
"no-case.js",
|
||||
"no-case.d.ts",
|
||||
"vendor",
|
||||
"LICENSE"
|
||||
],
|
||||
"homepage": "https://github.com/blakeembrey/no-case",
|
||||
"keywords": [
|
||||
"no",
|
||||
"case",
|
||||
"space",
|
||||
"lower",
|
||||
"trim"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "no-case.js",
|
||||
"name": "no-case",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/blakeembrey/no-case.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build.js",
|
||||
"lint": "standard",
|
||||
"test": "npm run lint && npm run test-cov",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail"
|
||||
},
|
||||
"standard": {
|
||||
"ignore": [
|
||||
"coverage/**"
|
||||
]
|
||||
},
|
||||
"typings": "no-case.d.ts",
|
||||
"version": "2.3.2"
|
||||
}
|
1
node_modules/no-case/vendor/camel-case-regexp.js
generated
vendored
Normal file
1
node_modules/no-case/vendor/camel-case-regexp.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/no-case/vendor/camel-case-upper-regexp.js
generated
vendored
Normal file
1
node_modules/no-case/vendor/camel-case-upper-regexp.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/no-case/vendor/non-word-regexp.js
generated
vendored
Normal file
1
node_modules/no-case/vendor/non-word-regexp.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user