From d25e11bee6ca5ca523884da132d18e1400e077b9 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 24 Aug 2021 14:41:48 +0200 Subject: Initial commit --- node_modules/strict-uri-encode/index.js | 6 +++++ node_modules/strict-uri-encode/license | 21 +++++++++++++++ node_modules/strict-uri-encode/package.json | 30 ++++++++++++++++++++++ node_modules/strict-uri-encode/readme.md | 40 +++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+) create mode 100644 node_modules/strict-uri-encode/index.js create mode 100644 node_modules/strict-uri-encode/license create mode 100644 node_modules/strict-uri-encode/package.json create mode 100644 node_modules/strict-uri-encode/readme.md (limited to 'node_modules/strict-uri-encode') diff --git a/node_modules/strict-uri-encode/index.js b/node_modules/strict-uri-encode/index.js new file mode 100644 index 0000000..414de96 --- /dev/null +++ b/node_modules/strict-uri-encode/index.js @@ -0,0 +1,6 @@ +'use strict'; +module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); +}; diff --git a/node_modules/strict-uri-encode/license b/node_modules/strict-uri-encode/license new file mode 100644 index 0000000..e0e9158 --- /dev/null +++ b/node_modules/strict-uri-encode/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +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. diff --git a/node_modules/strict-uri-encode/package.json b/node_modules/strict-uri-encode/package.json new file mode 100644 index 0000000..0028e1b --- /dev/null +++ b/node_modules/strict-uri-encode/package.json @@ -0,0 +1,30 @@ +{ + "name": "strict-uri-encode", + "version": "1.1.0", + "description": "A stricter URI encode adhering to RFC 3986", + "license": "MIT", + "repository": "kevva/strict-uri-encode", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "component", + "encode", + "RFC3986", + "uri" + ], + "devDependencies": { + "ava": "^0.0.4" + } +} diff --git a/node_modules/strict-uri-encode/readme.md b/node_modules/strict-uri-encode/readme.md new file mode 100644 index 0000000..2763272 --- /dev/null +++ b/node_modules/strict-uri-encode/readme.md @@ -0,0 +1,40 @@ +# strict-uri-encode [![Build Status](https://travis-ci.org/kevva/strict-uri-encode.svg?branch=master)](https://travis-ci.org/kevva/strict-uri-encode) + +> A stricter URI encode adhering to [RFC 3986](http://tools.ietf.org/html/rfc3986) + + +## Install + +``` +$ npm install --save strict-uri-encode +``` + + +## Usage + +```js +var strictUriEncode = require('strict-uri-encode'); + +strictUriEncode('unicorn!foobar') +//=> 'unicorn%21foobar' + +strictUriEncode('unicorn*foobar') +//=> 'unicorn%2Afoobar' +``` + + +## API + +### strictUriEncode(string) + +#### string + +*Required* +Type: `string`, `number` + +String to URI encode. + + +## License + +MIT © [Kevin Mårtensson](http://github.com/kevva) -- cgit