aboutsummaryrefslogtreecommitdiff
path: root/node_modules/to-iso-string
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-10 03:43:44 +0200
commitabd94a7f5a50f43c797a11b53549ae48fff667c3 (patch)
treeab8ed457f65cdd72e13e0571d2975729428f1551 /node_modules/to-iso-string
parenta0247c6a3fd6a09a41a7e35a3441324c4dcb58be (diff)
downloadwallet-core-abd94a7f5a50f43c797a11b53549ae48fff667c3.tar.xz
add node_modules to address #4364
Diffstat (limited to 'node_modules/to-iso-string')
-rw-r--r--node_modules/to-iso-string/.npmignore3
-rw-r--r--node_modules/to-iso-string/History.md9
-rw-r--r--node_modules/to-iso-string/Makefile17
-rw-r--r--node_modules/to-iso-string/Readme.md18
-rw-r--r--node_modules/to-iso-string/component.json9
-rw-r--r--node_modules/to-iso-string/index.js40
-rw-r--r--node_modules/to-iso-string/package.json84
-rw-r--r--node_modules/to-iso-string/test/index.js10
8 files changed, 190 insertions, 0 deletions
diff --git a/node_modules/to-iso-string/.npmignore b/node_modules/to-iso-string/.npmignore
new file mode 100644
index 000000000..665aa2197
--- /dev/null
+++ b/node_modules/to-iso-string/.npmignore
@@ -0,0 +1,3 @@
+components
+build
+node_modules
diff --git a/node_modules/to-iso-string/History.md b/node_modules/to-iso-string/History.md
new file mode 100644
index 000000000..f23b31e8c
--- /dev/null
+++ b/node_modules/to-iso-string/History.md
@@ -0,0 +1,9 @@
+
+0.0.2 - May 12, 2015
+--------------------
+
+- Fix npm publish issue
+
+0.0.1 - October 16, 2013
+------------------------
+:sparkles:
diff --git a/node_modules/to-iso-string/Makefile b/node_modules/to-iso-string/Makefile
new file mode 100644
index 000000000..9600296b2
--- /dev/null
+++ b/node_modules/to-iso-string/Makefile
@@ -0,0 +1,17 @@
+
+build: components node_modules
+ @component build --dev
+
+clean:
+ @rm -rf components build node_modules
+
+components: component.json
+ @component install --dev
+
+node_modules: package.json
+ @npm install
+
+test: build
+ @./node_modules/.bin/mocha --reporter spec
+
+.PHONY: clean test \ No newline at end of file
diff --git a/node_modules/to-iso-string/Readme.md b/node_modules/to-iso-string/Readme.md
new file mode 100644
index 000000000..905b8d636
--- /dev/null
+++ b/node_modules/to-iso-string/Readme.md
@@ -0,0 +1,18 @@
+
+# to-iso-string
+
+ Cross-browser toISOString support.
+
+## Example
+
+```js
+var iso = require('to-iso-string');
+var date = new Date("05 October 2011 14:48 UTC");
+
+iso(date);
+// "2011-10-05T14:48:00.000Z"
+```
+
+## License
+
+ MIT \ No newline at end of file
diff --git a/node_modules/to-iso-string/component.json b/node_modules/to-iso-string/component.json
new file mode 100644
index 000000000..f5270b58b
--- /dev/null
+++ b/node_modules/to-iso-string/component.json
@@ -0,0 +1,9 @@
+{
+ "name": "to-iso-string",
+ "repo": "segmentio/to-iso-string",
+ "version": "0.0.2",
+ "license": "MIT",
+ "description": "Cross-browser toISOString support.",
+ "keywords": ["iso", "format", "iso8601", "date", "isostring", "toISOString"],
+ "scripts": ["index.js"]
+}
diff --git a/node_modules/to-iso-string/index.js b/node_modules/to-iso-string/index.js
new file mode 100644
index 000000000..4675691f1
--- /dev/null
+++ b/node_modules/to-iso-string/index.js
@@ -0,0 +1,40 @@
+
+/**
+ * Expose `toIsoString`.
+ */
+
+module.exports = toIsoString;
+
+
+/**
+ * Turn a `date` into an ISO string.
+ *
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
+ *
+ * @param {Date} date
+ * @return {String}
+ */
+
+function toIsoString (date) {
+ return date.getUTCFullYear()
+ + '-' + pad(date.getUTCMonth() + 1)
+ + '-' + pad(date.getUTCDate())
+ + 'T' + pad(date.getUTCHours())
+ + ':' + pad(date.getUTCMinutes())
+ + ':' + pad(date.getUTCSeconds())
+ + '.' + String((date.getUTCMilliseconds()/1000).toFixed(3)).slice(2, 5)
+ + 'Z';
+}
+
+
+/**
+ * Pad a `number` with a ten's place zero.
+ *
+ * @param {Number} number
+ * @return {String}
+ */
+
+function pad (number) {
+ var n = number.toString();
+ return n.length === 1 ? '0' + n : n;
+} \ No newline at end of file
diff --git a/node_modules/to-iso-string/package.json b/node_modules/to-iso-string/package.json
new file mode 100644
index 000000000..700aea3aa
--- /dev/null
+++ b/node_modules/to-iso-string/package.json
@@ -0,0 +1,84 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "to-iso-string@0.0.2",
+ "scope": null,
+ "escapedName": "to-iso-string",
+ "name": "to-iso-string",
+ "rawSpec": "0.0.2",
+ "spec": "0.0.2",
+ "type": "version"
+ },
+ "/home/dold/repos/taler/wallet-webex/node_modules/mocha"
+ ]
+ ],
+ "_from": "to-iso-string@0.0.2",
+ "_id": "to-iso-string@0.0.2",
+ "_inCache": true,
+ "_location": "/to-iso-string",
+ "_nodeVersion": "2.0.1",
+ "_npmUser": {
+ "name": "ndhoule",
+ "email": "nathan@nathanhoule.com"
+ },
+ "_npmVersion": "2.9.0",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "to-iso-string@0.0.2",
+ "scope": null,
+ "escapedName": "to-iso-string",
+ "name": "to-iso-string",
+ "rawSpec": "0.0.2",
+ "spec": "0.0.2",
+ "type": "version"
+ },
+ "_requiredBy": [
+ "/mocha"
+ ],
+ "_resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz",
+ "_shasum": "4dc19e664dfccbe25bd8db508b00c6da158255d1",
+ "_shrinkwrap": null,
+ "_spec": "to-iso-string@0.0.2",
+ "_where": "/home/dold/repos/taler/wallet-webex/node_modules/mocha",
+ "bugs": {
+ "url": "https://github.com/segmentio/to-iso-string/issues"
+ },
+ "dependencies": {},
+ "deprecated": "to-iso-string has been deprecated, use @segment/to-iso-string instead.",
+ "description": "Cross-browser toISOString support.",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "4dc19e664dfccbe25bd8db508b00c6da158255d1",
+ "tarball": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz"
+ },
+ "gitHead": "dded50dbad7ad7568dfaf38e7fe623e43977837d",
+ "homepage": "https://github.com/segmentio/to-iso-string#readme",
+ "keywords": [
+ "iso",
+ "format",
+ "iso8601",
+ "date",
+ "isostring",
+ "toISOString"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "ndhoule",
+ "email": "nathan@nathanhoule.com"
+ }
+ ],
+ "name": "to-iso-string",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/segmentio/to-iso-string.git"
+ },
+ "scripts": {},
+ "version": "0.0.2"
+}
diff --git a/node_modules/to-iso-string/test/index.js b/node_modules/to-iso-string/test/index.js
new file mode 100644
index 000000000..11456b37f
--- /dev/null
+++ b/node_modules/to-iso-string/test/index.js
@@ -0,0 +1,10 @@
+
+var assert = require('assert');
+var iso = require('..');
+
+describe('to-iso-string', function () {
+ it('should work', function () {
+ var date = new Date("05 October 2011 14:48 UTC");
+ assert('2011-10-05T14:48:00.000Z' == iso(date));
+ });
+}); \ No newline at end of file