summaryrefslogtreecommitdiff
path: root/node_modules/strip-bom-string
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/strip-bom-string')
-rw-r--r--node_modules/strip-bom-string/LICENSE21
-rw-r--r--node_modules/strip-bom-string/README.md66
-rw-r--r--node_modules/strip-bom-string/index.js15
-rw-r--r--node_modules/strip-bom-string/package.json60
4 files changed, 162 insertions, 0 deletions
diff --git a/node_modules/strip-bom-string/LICENSE b/node_modules/strip-bom-string/LICENSE
new file mode 100644
index 0000000..ec85897
--- /dev/null
+++ b/node_modules/strip-bom-string/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015, 2017, Jon Schlinkert
+
+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/strip-bom-string/README.md b/node_modules/strip-bom-string/README.md
new file mode 100644
index 0000000..e7e5990
--- /dev/null
+++ b/node_modules/strip-bom-string/README.md
@@ -0,0 +1,66 @@
+# strip-bom-string [![NPM version](https://img.shields.io/npm/v/strip-bom-string.svg?style=flat)](https://www.npmjs.com/package/strip-bom-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/strip-bom-string.svg?style=flat)](https://npmjs.org/package/strip-bom-string) [![NPM total downloads](https://img.shields.io/npm/dt/strip-bom-string.svg?style=flat)](https://npmjs.org/package/strip-bom-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/strip-bom-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/strip-bom-string)
+
+> Strip a byte order mark (BOM) from a string.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save strip-bom-string
+```
+
+## Usage
+
+```js
+var strip = require('strip-bom-string');
+strip('\ufefffoo');
+//=> 'foo'
+```
+
+## About
+
+### Related projects
+
+* [cr](https://www.npmjs.com/package/cr): Strip windows carriage returns, or convert carriage returns to newlines. | [homepage](https://github.com/jonschlinkert/cr "Strip windows carriage returns, or convert carriage returns to newlines.")
+* [has-bom](https://www.npmjs.com/package/has-bom): Returns true if a buffer or string has a byte order mark (BOM) | [homepage](https://github.com/jonschlinkert/has-bom "Returns true if a buffer or string has a byte order mark (BOM)")
+* [read-file](https://www.npmjs.com/package/read-file): Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding… [more](https://github.com/jonschlinkert/read-file) | [homepage](https://github.com/jonschlinkert/read-file "Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding is chosen. Also optionally replaces windows newlines with unix newlines.")
+* [strip-bom-buffer](https://www.npmjs.com/package/strip-bom-buffer): Strip a byte order mark (BOM) from a buffer. | [homepage](https://github.com/jonschlinkert/strip-bom-buffer "Strip a byte order mark (BOM) from a buffer.")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+### Running tests
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 29, 2017._ \ No newline at end of file
diff --git a/node_modules/strip-bom-string/index.js b/node_modules/strip-bom-string/index.js
new file mode 100644
index 0000000..4caff84
--- /dev/null
+++ b/node_modules/strip-bom-string/index.js
@@ -0,0 +1,15 @@
+/*!
+ * strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
+ *
+ * Copyright (c) 2015, 2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+'use strict';
+
+module.exports = function(str) {
+ if (typeof str === 'string' && str.charAt(0) === '\ufeff') {
+ return str.slice(1);
+ }
+ return str;
+};
diff --git a/node_modules/strip-bom-string/package.json b/node_modules/strip-bom-string/package.json
new file mode 100644
index 0000000..b0c80fa
--- /dev/null
+++ b/node_modules/strip-bom-string/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "strip-bom-string",
+ "description": "Strip a byte order mark (BOM) from a string.",
+ "version": "1.0.0",
+ "homepage": "https://github.com/jonschlinkert/strip-bom-string",
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "repository": "jonschlinkert/strip-bom-string",
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/strip-bom-string/issues"
+ },
+ "license": "MIT",
+ "files": [
+ "index.js"
+ ],
+ "main": "index.js",
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "devDependencies": {
+ "gulp-format-md": "^0.1.11",
+ "mocha": "^3.2.0"
+ },
+ "keywords": [
+ "bom",
+ "byte",
+ "byte-order-mark",
+ "file",
+ "fs",
+ "mark",
+ "nl",
+ "normalize",
+ "order",
+ "string",
+ "strip"
+ ],
+ "verb": {
+ "related": {
+ "list": [
+ "cr",
+ "has-bom",
+ "read-file",
+ "strip-bom-buffer"
+ ]
+ },
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "lint": {
+ "reflinks": true
+ }
+ }
+}