Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gamalielmendez committed Nov 23, 2022
2 parents d0be714 + f038ee1 commit d486d62
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/PHP_CoreFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,7 @@ const rtrim = (str, chars = ' ') => {

};

const explode = (search, from) => {

return from.split(search)

}
const explode = (search, from) => { return `${from}`.split(`${search}`) }

const hexdec = (hexString) => {
// discuss at: https://locutus.io/php/hexdec/
Expand Down Expand Up @@ -237,8 +233,11 @@ const fseek = (f,n,position='SEEK_CUR') =>{
return read
}

const file_get_contents = ()=>{
const file_exists = (filename)=>{ return fs.existsSync(filename) }

const file_get_contents = (filename)=>{
// discuss at: https://locutus.io/php/file_get_contents/
return fs.readFileSync(filename, 'utf-8')
}

const strtr = (str, from, to) => {
Expand Down Expand Up @@ -731,6 +730,7 @@ module.exports = {
fclose,
fread,
fseek,
file_exists,
file_get_contents,
strtr,
array_keys,
Expand Down

0 comments on commit d486d62

Please sign in to comment.