diff options
| author | Shipwreckt <me@shipwreckt.co.uk> | 2025-10-31 20:02:14 +0000 |
|---|---|---|
| committer | Shipwreckt <me@shipwreckt.co.uk> | 2025-10-31 20:02:14 +0000 |
| commit | 7a52ddeba2a68388b544f529d2d92104420f77b0 (patch) | |
| tree | 15ddd47457a2cb4a96060747437d36474e4f6b4e /node_modules/strip-bom-string | |
| parent | 53d6ae2b5568437afa5e4995580a3fb679b7b91b (diff) | |
Changed from static to 11ty!
Diffstat (limited to 'node_modules/strip-bom-string')
| -rw-r--r-- | node_modules/strip-bom-string/LICENSE | 21 | ||||
| -rw-r--r-- | node_modules/strip-bom-string/README.md | 66 | ||||
| -rw-r--r-- | node_modules/strip-bom-string/index.js | 15 | ||||
| -rw-r--r-- | node_modules/strip-bom-string/package.json | 60 |
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 [](https://www.npmjs.com/package/strip-bom-string) [](https://npmjs.org/package/strip-bom-string) [](https://npmjs.org/package/strip-bom-string) [](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 + } + } +} |
