update
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
'use strict'
|
||||
|
||||
// Note: this is the semver.org version of the spec that it implements
|
||||
// Not necessarily the package version of this code.
|
||||
const SEMVER_SPEC_VERSION = '2.0.0'
|
||||
|
||||
const MAX_LENGTH = 256
|
||||
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
||||
/* istanbul ignore next */ 9007199254740991
|
||||
|
||||
// Max safe segment length for coercion.
|
||||
const MAX_SAFE_COMPONENT_LENGTH = 16
|
||||
|
||||
// Max safe length for a build identifier. The max length minus 6 characters for
|
||||
// the shortest version with a build 0.0.0+BUILD.
|
||||
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
|
||||
|
||||
const RELEASE_TYPES = [
|
||||
'major',
|
||||
'premajor',
|
||||
'minor',
|
||||
'preminor',
|
||||
'patch',
|
||||
'prepatch',
|
||||
'prerelease',
|
||||
]
|
||||
|
||||
module.exports = {
|
||||
MAX_LENGTH,
|
||||
MAX_SAFE_COMPONENT_LENGTH,
|
||||
MAX_SAFE_BUILD_LENGTH,
|
||||
MAX_SAFE_INTEGER,
|
||||
RELEASE_TYPES,
|
||||
SEMVER_SPEC_VERSION,
|
||||
FLAG_INCLUDE_PRERELEASE: 0b001,
|
||||
FLAG_LOOSE: 0b010,
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "bytes",
|
||||
"description": "Utility to parse a string bytes to bytes and vice-versa",
|
||||
"version": "3.1.2",
|
||||
"author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
|
||||
"contributors": [
|
||||
"Jed Watson <jed.watson@me.com>",
|
||||
"Théo FIDRY <theo.fidry@gmail.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"byte",
|
||||
"bytes",
|
||||
"utility",
|
||||
"parse",
|
||||
"parser",
|
||||
"convert",
|
||||
"converter"
|
||||
],
|
||||
"repository": "visionmedia/bytes.js",
|
||||
"devDependencies": {
|
||||
"eslint": "7.32.0",
|
||||
"eslint-plugin-markdown": "2.2.1",
|
||||
"mocha": "9.2.0",
|
||||
"nyc": "15.1.0"
|
||||
},
|
||||
"files": [
|
||||
"History.md",
|
||||
"LICENSE",
|
||||
"Readme.md",
|
||||
"index.js"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"test": "mocha --check-leaks --reporter spec",
|
||||
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
||||
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
# node-touch
|
||||
|
||||
For all your node touching needs.
|
||||
|
||||
## Installing
|
||||
|
||||
```bash
|
||||
npm install touch
|
||||
```
|
||||
|
||||
## CLI Usage:
|
||||
|
||||
See `man touch`
|
||||
|
||||
This package exports a binary called `nodetouch` that works mostly
|
||||
like the unix builtin `touch(1)`.
|
||||
|
||||
## API Usage:
|
||||
|
||||
```javascript
|
||||
var touch = require("touch")
|
||||
```
|
||||
|
||||
Gives you the following functions:
|
||||
|
||||
* `touch(filename, options, cb)`
|
||||
* `touch.sync(filename, options)`
|
||||
* `touch.ftouch(fd, options, cb)`
|
||||
* `touch.ftouchSync(fd, options)`
|
||||
|
||||
All the `options` objects are optional.
|
||||
|
||||
All the async functions return a Promise. If a callback function is
|
||||
provided, then it's attached to the Promise.
|
||||
|
||||
## Options
|
||||
|
||||
* `force` like `touch -f` Boolean
|
||||
* `time` like `touch -t <date>` Can be a Date object, or any parseable
|
||||
Date string, or epoch ms number.
|
||||
* `atime` like `touch -a` Can be either a Boolean, or a Date.
|
||||
* `mtime` like `touch -m` Can be either a Boolean, or a Date.
|
||||
* `ref` like `touch -r <file>` Must be path to a file.
|
||||
* `nocreate` like `touch -c` Boolean
|
||||
|
||||
If neither `atime` nor `mtime` are set, then both values are set. If
|
||||
one of them is set, then the other is not.
|
||||
|
||||
## cli
|
||||
|
||||
This package creates a `nodetouch` command line executable that works
|
||||
very much like the unix builtin `touch(1)`
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
Merges "own" properties from a source to a destination object, including non-enumerable and accessor-defined properties. It retains original values and descriptors, ensuring the destination receives a complete and accurate copy of the source's properties.
|
||||
|
||||
@param destination - The object to receive properties.
|
||||
@param source - The object providing properties.
|
||||
@param overwrite - Optional boolean to control overwriting of existing properties. Defaults to true.
|
||||
@returns The modified destination object.
|
||||
*/
|
||||
declare function mergeDescriptors<T, U>(destination: T, source: U, overwrite?: boolean): T & U;
|
||||
|
||||
export = mergeDescriptors;
|
||||
Reference in New Issue
Block a user