Created
April 22, 2017 10:48
-
-
Save felixfong227/0ad9d201ea4d6fd17162863264d5a8fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a simple text file that contain useless information that we are not going to use it anyways lol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs-promise'); | |
const path = require('path'); | |
const co = require('co'); | |
co(function *(){ | |
const content = yield fs.readFile(path.join(`${__dirname}/file.txt`), 'utf-8'); | |
const uppercase = content.toUpperCase(); | |
yield fs.writeFile(path.join(`${__dirname}/uppercase.text`), uppercase); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"co": "^4.6.0", | |
"fs-promise": "^2.0.2" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THIS IS A SIMPLE TEXT FILE THAT CONTAIN USELESS INFORMATION THAT WE ARE NOT GOING TO USE IT ANYWAYS LOL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | |
# yarn lockfile v1 | |
any-promise@^1.0.0, any-promise@^1.3.0: | |
version "1.3.0" | |
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" | |
co@^4.6.0: | |
version "4.6.0" | |
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" | |
fs-extra@^2.0.0: | |
version "2.1.2" | |
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" | |
dependencies: | |
graceful-fs "^4.1.2" | |
jsonfile "^2.1.0" | |
fs-promise@^2.0.2: | |
version "2.0.2" | |
resolved "https://registry.yarnpkg.com/fs-promise/-/fs-promise-2.0.2.tgz#cfea45c80f46480a3fd176213fa22abc8c159521" | |
dependencies: | |
any-promise "^1.3.0" | |
fs-extra "^2.0.0" | |
mz "^2.6.0" | |
thenify-all "^1.6.0" | |
graceful-fs@^4.1.2, graceful-fs@^4.1.6: | |
version "4.1.11" | |
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" | |
jsonfile@^2.1.0: | |
version "2.4.0" | |
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" | |
optionalDependencies: | |
graceful-fs "^4.1.6" | |
mz@^2.6.0: | |
version "2.6.0" | |
resolved "https://registry.yarnpkg.com/mz/-/mz-2.6.0.tgz#c8b8521d958df0a4f2768025db69c719ee4ef1ce" | |
dependencies: | |
any-promise "^1.0.0" | |
object-assign "^4.0.1" | |
thenify-all "^1.0.0" | |
object-assign@^4.0.1: | |
version "4.1.1" | |
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" | |
thenify-all@^1.0.0, thenify-all@^1.6.0: | |
version "1.6.0" | |
resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" | |
dependencies: | |
thenify ">= 3.1.0 < 4" | |
"thenify@>= 3.1.0 < 4": | |
version "3.2.1" | |
resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.2.1.tgz#251fd1c80aff6e5cf57cb179ab1fcb724269bd11" | |
dependencies: | |
any-promise "^1.0.0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment