
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
fo.deletefo.changeExtfo.isFilefo.buildFilegetFilesListCollection of usefull operations with files.
let fo = require('als-fo)
// If obj can be stringified, returned stringified.
fo.isJson(obj)
// Checking if path array and return joined path or return path
fo.path(path)
// Checking if obj is json and stringify it. Writing the file to path. Path checked by fo.path.
fo.writeFile(path,obj,encoding = 'utf-8')
// Readigng file, if json return object. Path checked by fo.path.
fo.readFile(path,encoding = 'utf-8')
// If path exists, return true. Else return false. Path checked by fo.path.
fo.isExist(path)
// Check if module exists, deleting cache and return required module
fo.require(path) // if not exists return empty object
// Checking if folder for path are existen. Creating file with fo.path and fo.isJson
// If where givemt console.log(result)
fo.createPath(path,content,where='')
// If folder not exists, create it.
fo.makeDir(dir)
// Removing dirToRemove, adding host and replace \ to /
fo.urlFromPath(path,dirToRemove,host)
// Wathing given folder(dir) and runs function(fn) then change occures. fn(event,filename)
fo.watchDir(dir,fn)
// Runs recursevly and return list of files in given folder(dir) and it's subfolders with given extension (ext).
// If extension not given, return all files in folder and it's subfolders.
// ignore array will include path of files to ignore
fo.getFilesList(dir,ext,ignore=[],filelist = [])
// if path has this extension return true, else return extension of given path
fo.ext(path,ext)
// Runs fo.getFilesList and get all files. Then add it to mainList (has to be array)
fo.addToList(path,mainList)
// Just return time in hh:mm:ss
fo.now()
// return path creation date
fo.fileDate(path)
// delete the path
fo.delete(path)
// recursive copy files and foldre from src to dest
fo.copy(src, dest)
// Checks if path is directory. Retrun true if directory and false if not
fo.isDir(path)
// Checks if path is file. Retrun true if file and false if not
fo.isFile(path)
// If cli has 'order' parameter return fn(argv). else return error to console
fo.cli(order,fn,error)
// return capitalized string
fo.upperFirst(string)
// Changing extension of file to newExt(without dot). path can be array (fo.path)
fo.changeExt(path,newExt)
// if srcFilePath is js file: fo.require(srcFilePath). if content is function running function if error, content = ''.
// hooks will include functions with parameters (content,srcFilePath) and has to return content (string)
fo.buildFile(srcFilePath,hooks=[])
FAQs
Collection of usefull operations with files.
We found that als-fo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.